Application Development and Automation 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: 
Read only

standard text include

Former Member
0 Likes
330

Hi all,

i should check a particular sales org. if the particular sales org is satisfied, i should include a standard text in the main window. assume that the standard text name is zv_standard_text.

what code should i need to include in form and print program. The value of sales org is available to the form program.

Please help, i have knowledge on SAP Script, but am doubtful little.

Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
309

Hi,

In Script first you can check for the sales org. if the condition is satisfied include the following code

/: IF sales org (condition satisfied).

/: DEFINE &G_STD_TEXT& = ' '

/: PERFORM GET_STANDARD_TEXT IN PROGRAM YTEST

/: CHANGING &G_STD_TEXT&

/: ENDPERFORM

/: INCLUDE &G_STD_TEXT& OBJECT TEXT ID ST LANGUAGE &EKKO-SPRAS&

/: ENDIF.

In Driver Program: YTEST (Se38) write the following logic

FORM get_standard_text TABLES tbl_input STRUCTURE itcsy

tbl_output STRUCTURE itcsy.

DATA : l_stdtext(128) TYPE c.

CONSTANTS : c_stdtxt(128) TYPE c VALUE 'ZV_STANDARD_TEXT' .

MOVE c_stdtxt TO l_stdtext.

tbl_output-value = l_stdtext.

MODIFY tbl_output INDEX 1 TRANSPORTING value.

ENDFORM.

Hope this helps you.

Please do reward incase this is useful to you.

Regards,

Farheen

1 REPLY 1
Read only

Former Member
0 Likes
310

Hi,

In Script first you can check for the sales org. if the condition is satisfied include the following code

/: IF sales org (condition satisfied).

/: DEFINE &G_STD_TEXT& = ' '

/: PERFORM GET_STANDARD_TEXT IN PROGRAM YTEST

/: CHANGING &G_STD_TEXT&

/: ENDPERFORM

/: INCLUDE &G_STD_TEXT& OBJECT TEXT ID ST LANGUAGE &EKKO-SPRAS&

/: ENDIF.

In Driver Program: YTEST (Se38) write the following logic

FORM get_standard_text TABLES tbl_input STRUCTURE itcsy

tbl_output STRUCTURE itcsy.

DATA : l_stdtext(128) TYPE c.

CONSTANTS : c_stdtxt(128) TYPE c VALUE 'ZV_STANDARD_TEXT' .

MOVE c_stdtxt TO l_stdtext.

tbl_output-value = l_stdtext.

MODIFY tbl_output INDEX 1 TRANSPORTING value.

ENDFORM.

Hope this helps you.

Please do reward incase this is useful to you.

Regards,

Farheen