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: 

display a dynamic string with table fields

Suryaji26
Participant
0 Kudos

HI Gurus,

Please help me with the below string display with dynamic variables

display the message - 'Document <Company Code> <Vendor> <Fiscal year> <Document Number> successfully posted'.

i am trying to display with the help of & &

  CONCATENATE &ACCOUNTGL-COMP_CODE& &ACCOUNTPAYABLE-VENDOR_NO& &DOCUMENTHEADER-FIS_PERIOD& &BDWFRETVAR-DOC_NUMBER& INTO gv_mail_text SEPARATED BY space.

but i am getting the below error.

field &ACCOUNTGL-COMP_CODE&  is unknown.

Br,

Surya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Surya,

You can pass the dynamic values into local variables like (

lv1 = ACCOUNTGL-COMP_CODE , lv2 = ACCOUNTPAYABLE-VENDOR_NO )

and then concatenate.


CONCATENATE LV1 LV2 LV3 LV4 INTO gv_mail_text SEPARATED BY space.

4 REPLIES 4

Former Member
0 Kudos

HI Surya,

I think you are using Message class like

and then displaying it like

DATA: A TYPE C LENGTH 20,
       B TYPE C LENGTH 20,
       C TYPE C LENGTH 20,
       D TYPE C LENGTH 20.

A = 'GMS'.
B = 'V0001'.
C = '2015'.
D = '01234'.

MESSAGE E001(ZR) WITH  A B C D .


isn't?

Former Member
0 Kudos

Hi Surya,

You can pass the dynamic values into local variables like (

lv1 = ACCOUNTGL-COMP_CODE , lv2 = ACCOUNTPAYABLE-VENDOR_NO )

and then concatenate.


CONCATENATE LV1 LV2 LV3 LV4 INTO gv_mail_text SEPARATED BY space.

0 Kudos

Thanks Muthu,

You solved my problem and point assigned .

Br,

Surya

0 Kudos

Thanks Surya.