‎2007 Mar 22 4:03 PM
HELLO EXPERTS...
here is one field in the field catalog...
fieldcatalog-fieldname = 'LGOBE'.
fieldcatalog-seltext_m = 'ST.LOC DESCRIPTION'.
fieldcatalog-col_pos = 14.
fieldcatalog-ref_tabname = 'T001L'.
fieldcatalog-ref_fieldname = 'LGOBE'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
I designed this same field 3 times to get the different details in different columns
and select statements...
SELECT ebeln aedat ekgrp ekorg lifnr
INTO CORRESPONDING FIELDS OF TABLE IT_EKKO_HDR FROM ekko
WHERE lifnr IN p_lifnr
AND ebeln IN p_ebeln
AND ekgrp IN p_ekgrp
AND aedat IN p_aedat
AND ernam IN p_ernam.
SELECT ekpo~ebeln
ekpo~ebelp
ekpo~menge
ekpo~meins
ekpo~matnr
ekpo~txz01
ekpo~idnlf
MARD~WERKS
mard~lgort
mard~lgpbe
t001l~lgobe
ekes~menge
eket~wemng
INTO TABLE it_ekko_itm FROM ekpo
INNER JOIN eket ON ekpoebeln = eketebeln AND ekpoebelp = eketebelp
INNER JOIN t001l ON ekpowerks = t001lwerks
INNER JOIN mard ON ekpomatnr = mardmatnr AND ekpowerks = mardwerks
INNER JOIN ekes ON ekpoebeln = ekesebeln AND ekpoebelp = ekesebelp
FOR ALL entries IN it_ekko_hdr WHERE ekpo~ebeln = it_ekko_hdr-ebeln
AND ekpo~matnr IN p_matnr.
AND eket~eindt IN p_eindt.
LOOP AT IT_EKKO_itm.
MOVE-CORRESPONDING IT_EKKO_ITM TO IT_EKKO.
READ TABLE IT_EKKO_HDR WITH KEY EBELN = IT_EKKO-EBELN.
IF SY-SUBRC = 0.
IT_EKKO-aedat = IT_EKKO_HDR-AEDAT.
IT_EKKO-ekgrp = IT_EKKO_HDR-EKGRP.
IT_EKKO-ekorg = IT_EKKO_HDR-EKORG.
IT_EKKO-lifnr = IT_EKKO_HDR-LIFNR.
ENDIF.
APPEND IT_EKKO.
CLEAR: IT_EKKO.
ENDLOOP.
Ya with this coding, I am getting the result like
St location 1 TEST2
St location 2 TEST2
St location 3 TEST2
Returns Location TEST2
St location 1 TEST1
St location 2 TEST1
St location 3 TEST1
Returns Location TEST1
but what i want is, I have to seperate the same field like for the storage location here i am having 3 different descriptions, i have to maintain those in different colums ... so the output should be
<b>storagelocation1 test1 storagelocation2 test2 storagelocation3 test3.</b>
can anyone guide me to distribute the data from the select statement so that i can get the storage location in different columns
plz its bit urgent
SIRI
‎2007 Mar 22 5:16 PM
Hi!
If I understand you good...
You declare 3 fields for LGOBE, for example LGOBE1, LGOBE2, LGOBE3.
In the selection, you can code it like this
SELECT mardlgobe AS lgobe1 mardlgobe AS lgobe2 mard~lgobe AS lgobe3 ...
This coding will move the mard~lgobe value into the 3 fields.
Regards
Tamá