12-27-2007 12:18 PM
Hi,
I need to add Bseg-sutxt field in my form with out modifying standard program. please give me some ligic
12-27-2007 12:25 PM
Please check this Example.
1.Create other program consist of subroutinue.
2.call that in text editor.
Example:
/: PERFORM GET_VALUE IN PROGRAM ZPROG
/: USING &V_VAR1&
/: CHANGING &V_VAR2&
/: ENDPERFORM
Coding of the calling ABAP program:
codeREPORT ZPROG.
FORM GET_VALUE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
data: l_field type i,
l_field2 type i.
if the date is in MM/DD/YYYY format
READ TABLE IN_PAR WITH KEY MHNK-AUSDT.
IF SY-SUBRC = 0.
l_field = IN_PAR-VALUE.
ENDIF.
l_field2 = l_field + l_field2.
READ TABLE OUT_PAR WITH KEY V_VAR2.
IF SY-SUBRC = 0.
OUT_PAR-VALUE = l_field2.
ENDIF.
ENDIF.[/code]
Thanks and Regards,
12-27-2007 12:24 PM
I am sure BSEG would have been accessed in the std progrm so u can directly use this field in the sap script.
12-27-2007 12:29 PM
Yes, that field is using in form also. but in ouput that field not getting
12-27-2007 12:25 PM
Please check this Example.
1.Create other program consist of subroutinue.
2.call that in text editor.
Example:
/: PERFORM GET_VALUE IN PROGRAM ZPROG
/: USING &V_VAR1&
/: CHANGING &V_VAR2&
/: ENDPERFORM
Coding of the calling ABAP program:
codeREPORT ZPROG.
FORM GET_VALUE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
data: l_field type i,
l_field2 type i.
if the date is in MM/DD/YYYY format
READ TABLE IN_PAR WITH KEY MHNK-AUSDT.
IF SY-SUBRC = 0.
l_field = IN_PAR-VALUE.
ENDIF.
l_field2 = l_field + l_field2.
READ TABLE OUT_PAR WITH KEY V_VAR2.
IF SY-SUBRC = 0.
OUT_PAR-VALUE = l_field2.
ENDIF.
ENDIF.[/code]
Thanks and Regards,