06-16-2009 7:03 AM
hi
below is my code...
if i enter one plant in the selection screen then my prgrm works fine
now my prblm is in selection screen if i enetr more than 1 plant then i should get uot put as below
Process Order details for 1120,1130,1410
how to do this?
DATA: it_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
werks1 TYPE eine-werks,
werks2 TYPE eine-werks,
t_text TYPE string.
move i_werks-low to werks1.
LOOP AT i_werks.
CONCATENATE text-to1 ':' werks1 INTO t_text SEPARATED BY space.
wa_header-typ = 'H'.
wa_header-info = t_text.
APPEND wa_header to it_header.
CLEAR wa_header.
ENDLOOP.
06-16-2009 7:11 AM
Hi,
First select the plants into a table using the select option field i_werks, and loop that internal table and concatenate.
Looping at the select option table i_werks will not work.
Regards
06-16-2009 7:09 AM
LOOP AT i_werks.
if sy-tabix = 1.
CONCATENATE text-to1 ':' i_werks-low INTO t_text SEPARATED BY space.
else.
concatenate t_text i_werks-low INTO t_text SEPARATED BY ','.
endif.
wa_header-typ = 'H'.
wa_header-info = t_text.
APPEND wa_header to it_header.
CLEAR wa_header.
ENDLOOP.
06-16-2009 7:11 AM
Hi,
First select the plants into a table using the select option field i_werks, and loop that internal table and concatenate.
Looping at the select option table i_werks will not work.
Regards
06-16-2009 7:25 AM
06-16-2009 7:40 AM
Hi,
Do similar to this
DATA : G_WERKS TYPE WERKS_D,
IT_WERKS TYPE TABLE OF WERKS_D,
WA_WERKS TYPE WERKS_D,
TEXT TYPE CHAR1024.
SELECT-OPTIONS : I_werks for g_werks.
SELECT WERKS
FROM T001W
INTO TABLE IT_WERKS
WHERE WERKS IN I_werks. " Table IT_WERKS will contain plants based on user Input
LOOP AT IT_WERKS INTO WA_WERKS.
CONCATENATE TEXT WA_WERKS INTO TEXT SEPARATED BY SPACE.
ENDLOOP.
WRITE TEXT.
Use the variable TEXT in the header
Regards
Edited by: Rajvansh Ravi on Jun 16, 2009 8:41 AM
06-16-2009 7:13 AM
hi
you cant give like this, you have to CONCATENATE all the plant b4 pass the 'wa_header-info'
move i_werks-low to werks1.
move i_werks-high to werks2.
CONCATENATE text-to1 ':' werks1 '-' werks2 INTO t_text SEPARATED BY space.
wa_header-typ = 'H'.
wa_header-info = t_text.
APPEND wa_header to it_header.
CLEAR wa_header.
regard
nawa.
06-16-2009 7:56 AM
first of all try to debug these kind of issues .. it will solve everything !!!!
move i_werks-low to werks1. <----werks 1 will always have only one plant
werks1 is never changed in the below statement
CONCATENATE text-to1 ':' werks1 INTO t_text SEPARATED BY space.
06-16-2009 8:02 AM