Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: sap script

Former Member
0 Kudos

Hi,

I need to add Bseg-sutxt field in my form with out modifying standard program. please give me some ligic

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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,

3 REPLIES 3

Former Member
0 Kudos

I am sure BSEG would have been accessed in the std progrm so u can directly use this field in the sap script.

0 Kudos

Yes, that field is using in form also. but in ouput that field not getting

Former Member
0 Kudos

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,