1、In Tcode SE37, you can see a import tab(the parameters needed to pass into the function module) here, if the Option is selected, the parameter is not required, if the Pass Value is selected , the parameter is passed by value but not passed by reference.在 Tcode SE37, 这里import 是传入参数, Option 如果打扣,就是可选的
2、(不是必须), Pass Value 如果打扣,就是值传递(不是引用传递,这个概念基本编程语言都有,如果不懂上网查下)The parameters in the Export tab is parameters the function return value after process.Export tab里的参数是 Function运行后的传出参数You can put the export or import parameters in Changing tab, usually you can put a parameter which will be modified in the
3、 function你可以把那传入或传出的参数放在Changing这里,通常我会把那些在Function里改变的变量放这里In the table tab, the table needed to be import or export can be put here. With the LIKE keyword, the table is difined with head line在Table 这里,当然就是Table了,可以是传出的或传入的,用LIKE 一个结构体来定义一个有Head line 的FunctionYou can maintain the exception after th
4、e function. After the calling, the SY-SUBRC will be set to the exception number, is Text ID invalid, SY-SUBRC will be set to 1, if Invalid language, SY-SUBRC will be set to 2, etc. If there is no exception, SY-SUBRC will be 0.你可以把Exception维护在这里,当完成Call function后,系统变量SY-SUBRC 会设成Exception的值,如果ID无效,SY
5、-SUBRC会设成1,如果语言无效,SY-SUBRC会设成2,如此类推。如果没异常,则SY-SUBRC会是0.The code below call the function module READ_TEXT to get the long text of the material以下的代码可以拿到这个物料的长文本But to the program the parameters is exported into the function(import in SE37), when finishing calling the program will import the parameters
6、 from the function module.在程中,程序把参数传出给FM, 当调用FM后,程序引进FM的结果,这里是和SE37那里相对的。DATA:lt_tlineTYPESTANDARDTABLEOFtline,lw_tlinetline.CALLFUNCTIONEXPORTING*CLIENT=SY-MANDTidGRUNlanguageEname1500-600objectMATERIALARCHIVE_HANDLELOCAL_CATIMPORTINGHEADER=TABLESlineslt_tlineEXCEPTIONS123not_found45reference_check6wrong_access_to_archive7OTHERS8.IFsy-subrc0.MESSAGEIDSY-MSGIDSY-MSGTYNUMBERSY-MSGNOWITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.ELSE.LOOPATINTOlw_tline.WRITE:/lw_tline-tdline.ENDLOOP.ENDIF.
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1