requirement: I have to create custom functions in CTU6 and assign these functions to Templates in CPT2. Basically I need more of a kind of technical info/guide in these FI Tcodes.
1: I have been able to create the FM, but how do we assign it with parameters in CTU6 tcode? Because after assigning the FM, we are not able to pass parameters to the FM which will take runtime values. Some sample codes will be helpful. basically the system generates a runtime code where this custom function is called. But the values in the call are hard coded. I want them to be dynamically assigned in runtime. Like the field CHARG to pick values for the SO under consideartion.
Sample system code:
CALL FUNCTION 'Y_GET_BODYTYPE' EXPORTING CHARG = '0000001564' FIELDNAME = '' PERIOD_FROM = ABC_CON-PERIODFROM PERIOD_CNT = ABC_CON-PERIODCNT CALL_PROG = ABC_CON-REPID TABLES RTABLE_VAL = LC_1_TAB.
here I have hard codes the values in CTU6. But i want the values to be picked at runtime from VBAP-CHARG. how do i assign this in CTU6??
2: in CPT2, for every sub-template, how do we use our function code? I could only hard code the values there but I need to know how do we make these values dynamic?