2010 Aug 23 10:44 AM
1.) I have one internal table where :- itemp
I have one internal table
LINE1 | KUNNR | VKORG | SPART | MATNR | VBELN | XTLINE1
1 | 23769 | DSMK | GS | 1213 | 6010002666|
2 | 23773 | DSMK | GS | 1231 | 6010002667|
3 | 23769 | DSMK | GS | 1213 | 6010002666|
-
2.) Now within XTLINE we have following data :-
XTLINE-TDLINE ( from READ_TEXT function module ) for VBELN = 6010002666
QTY 10 DATE 30.02.2010
QTY 50 DATE 30.01.2010
XTLINE-TDLINE ( from READ_TEXT function module ) for VBELN = 6010002667
QTY XX
QTY YY
This data needs to be updated in XTLINE1 in above internal table itemp1.
Provide me the logic to update the internal table itemp
-
-
2010 Aug 23 11:52 AM
yes you need to call read_text in each loop pass for each document number.
loop at itab.
* call function 'READ_TEXT'
* move the text field to itab.
modify itab transporting xline1.
endloop.
1.) I have one internal table where :- itemp
I have one internal table
LINE1 | KUNNR | VKORG | SPART | MATNR | VBELN | XTLINE1
1 | 23769 | DSMK | GS | 1213 | 6010002666|
2 | 23773 | DSMK | GS | 1231 | 6010002667|
3 | 23769 | DSMK | GS | 1213 | 6010002666|
-
2.) Now within XTLINE we have following data :-
XTLINE-TDLINE ( from READ_TEXT function module ) for VBELN = 6010002666
QTY 10 DATE 30.02.2010
QTY 50 DATE 30.01.2010
XTLINE-TDLINE ( from READ_TEXT function module ) for VBELN = 6010002667
QTY XX
QTY YY
This data needs to be updated in XTLINE1 in above internal table itemp1.
Provide me the logic to update the internal table itemp
-
-
2010 Aug 23 11:15 AM
Hi,
Please see a high level code below:
Expecting you are calling read_text function module in a loop at itemp.
Put the below code in that loop.
itemp-xtline1[] = xtline[].
modify itemp.
Please note the itemp-xtline1 is type table tline
Cheers.
2010 Aug 23 11:52 AM
yes you need to call read_text in each loop pass for each document number.
loop at itab.
* call function 'READ_TEXT'
* move the text field to itab.
modify itab transporting xline1.
endloop.
2010 Aug 23 12:09 PM
Hi,
May be this code will help u.
DATA : TLINES1 TYPE TLINE OCCURS 0,
l_vbeln LIKE THEAD-TDNAME,
WA_LINE1 TYPE TLINE,
temp type string.
Loop at itemp.
REFRESH TLINES1.
l_vbeln = itemp-vbeln.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = ' '
LANGUAGE = 'E'
NAME = L_vbeln
OBJECT = ' '
TABLES
LINES = TLINES1
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
FLAG = 1.
ELSEIF SY-SUBRC = 0.
FLAG = 0.
LOOP AT TLINES1 INTO WA_LINE1.
T_LONG_TEXT-TDLINE = WA_LINE1-TDLINE.
APPEND T_LONG_TEXT.
ENDLOOP.
ENDIF.
clear temp.
APPEND LINES OF t_long_text to temp.
itemp-txline1 = temp.
modify itemp transproting txline1.
endloop.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |