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: 

Some Questions

Former Member
0 Kudos

Hello,

What are Standard Texts?

Where we use Chain and End chain?

How to pass the variables to forms?

VG

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Standard text are used in the scripts,

To maintain them, use the standard text editor (transaction SO10).

Chain and endchain are used in the screens. For example there are 5 fields in the screen and u like to error message for those fields. In the PAI use the chain. endchain. This will make other fields in input enabled mode.

CHAIN.

  • FIELD chk_connobj.

FIELD chk_connobj.

FIELD chk_inst.

FIELD chk_devloc.

FIELD addr1_data-street.

FIELD addr1_data-city1.

FIELD addr1_data-country.

FIELD addr1_data-post_code1.

FIELD /qas/scr_search.

FIELD /qas/scr_iso.

MODULE modify_screenfields1.

ENDCHAIN.

MODULE modify_screenfields1 INPUT.

DATA: lws_landx TYPE t005t-landx,

lws_bezei TYPE t005u-bezei,

lws_text(50) TYPE c.

CLEAR: lws_landx, lws_text, lws_bezei.

CASE sy-ucomm.

WHEN 'ENTER' OR 'EXECUTE'.

IF chk_connobj EQ c_x.

IF addr1_data-street IS INITIAL.

CONCATENATE text-024 text-026 text-025 INTO lws_text

SEPARATED BY space.

SET CURSOR FIELD 'ADDR1_DATA-STREET'.

MESSAGE e000(zo_spa) WITH text-034. " Mandatory field

ENDIF.

IF addr1_data-city1 IS INITIAL.

CONCATENATE text-024 text-027 text-025 INTO lws_text

SEPARATED BY space.

SET CURSOR FIELD 'ADDR1_DATA-CITY1'.

MESSAGE e000(zo_spa) WITH text-035. " Mandatory field

ENDIF.

.

.

.

.

ENDMODULE. " modify_screenfields1 INPUT

Regards,

Prakash.

3 REPLIES 3

Former Member
0 Kudos

standard text :

to display any STATIC text to the user we store that text as a STANDARD text. we can create it using S010 transaction.

advantages : we can do the translation to different languages.

passing variables to FORMS:

option 1:

data : v_matnr type mara-matnr.

perform get_data using v_matnr.

and its associated FORM definition is,

FORM GET_DATA USING P_MATNR.

*--YOUR logic here

ENDFORM.

OPTION 2

If you want to get some values from the FORM,

use CHANGING.

DATA : V_TEXT TYPE MAKT-MAKTX.

perform get_data using v_matnr

CHANGING V_TEXT

and its associated FORM definition is,

FORM GET_DATA USING P_MATNR

CHANGING P_TEXT.

*--YOUR logic here

P_TEXT = 'YOUR NEW VALUES'.

ENDFORM.

Regards,

Srikanth

Message was edited by: Srikanth Kidambi

Former Member
0 Kudos

Standard text are used in the scripts,

To maintain them, use the standard text editor (transaction SO10).

Chain and endchain are used in the screens. For example there are 5 fields in the screen and u like to error message for those fields. In the PAI use the chain. endchain. This will make other fields in input enabled mode.

CHAIN.

  • FIELD chk_connobj.

FIELD chk_connobj.

FIELD chk_inst.

FIELD chk_devloc.

FIELD addr1_data-street.

FIELD addr1_data-city1.

FIELD addr1_data-country.

FIELD addr1_data-post_code1.

FIELD /qas/scr_search.

FIELD /qas/scr_iso.

MODULE modify_screenfields1.

ENDCHAIN.

MODULE modify_screenfields1 INPUT.

DATA: lws_landx TYPE t005t-landx,

lws_bezei TYPE t005u-bezei,

lws_text(50) TYPE c.

CLEAR: lws_landx, lws_text, lws_bezei.

CASE sy-ucomm.

WHEN 'ENTER' OR 'EXECUTE'.

IF chk_connobj EQ c_x.

IF addr1_data-street IS INITIAL.

CONCATENATE text-024 text-026 text-025 INTO lws_text

SEPARATED BY space.

SET CURSOR FIELD 'ADDR1_DATA-STREET'.

MESSAGE e000(zo_spa) WITH text-034. " Mandatory field

ENDIF.

IF addr1_data-city1 IS INITIAL.

CONCATENATE text-024 text-027 text-025 INTO lws_text

SEPARATED BY space.

SET CURSOR FIELD 'ADDR1_DATA-CITY1'.

MESSAGE e000(zo_spa) WITH text-035. " Mandatory field

ENDIF.

.

.

.

.

ENDMODULE. " modify_screenfields1 INPUT

Regards,

Prakash.

Former Member
0 Kudos

hi venkat,

for more info about FORM routines,

check this link.

http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm

here

open the tree ABAP programming languages->modularization techniques->procedures->subroutines.

go thru the help available here.very useful.

Regards,

Srikanth.