‎2007 Mar 06 1:32 PM
Hi Friends,
this is my code in a subroutine of my script.
i'm unable to get value into outtab.
This is my code - plz look into this and advice me.
LOOP AT T_VTTP.
Select BRGEW from LIPS
SELECT SUM( BRGEW )
INTO L_BRGEW
FROM LIPS
WHERE
VBELN = T_VTTp-VBELN .
IF SY-SUBRC EQ 0.
L_BRGEW_TOT = L_BRGEW_TOT + L_BRGEW.
ENDIF.
read table outtab index sy-tabix.
if outtab-name = c_weight.
outtab-value = L_BRGEW_TOT.
modify outtab index sy-tabix.
endif.
‎2007 Mar 06 1:36 PM
Hello,
Make this change.
data: l_tabix like sy-tabix. " Check here
LOOP AT T_VTTP.
l_tabix = sy-tabix. " Check here
* Select BRGEW from LIPS
SELECT SUM( BRGEW )
INTO L_BRGEW
FROM LIPS
WHERE
VBELN = T_VTTp-VBELN .
IF SY-SUBRC EQ 0.
L_BRGEW_TOT = L_BRGEW_TOT + L_BRGEW.
read table outtab index l_tabix. " Check here
if outtab-name = c_weight.
outtab-value = L_BRGEW_TOT.
modify outtab index L_tabix. " Check here
endif.
ENDIF.
endlloop. " Check here
If useful reward.
Vasanth
‎2007 Mar 06 1:36 PM
Hello,
Make this change.
data: l_tabix like sy-tabix. " Check here
LOOP AT T_VTTP.
l_tabix = sy-tabix. " Check here
* Select BRGEW from LIPS
SELECT SUM( BRGEW )
INTO L_BRGEW
FROM LIPS
WHERE
VBELN = T_VTTp-VBELN .
IF SY-SUBRC EQ 0.
L_BRGEW_TOT = L_BRGEW_TOT + L_BRGEW.
read table outtab index l_tabix. " Check here
if outtab-name = c_weight.
outtab-value = L_BRGEW_TOT.
modify outtab index L_tabix. " Check here
endif.
ENDIF.
endlloop. " Check here
If useful reward.
Vasanth
‎2007 Mar 06 1:41 PM
No Vasant, its not working..
I have tried this one.
i'm really surprised - for everything sy-subrc = 0,
but outab-value is not getting populated.
‎2007 Mar 06 1:44 PM
Hello Praveen,
Try like this:
data: l_tabix like sy-tabix. " Check here
LOOP AT T_VTTP.
l_tabix = sy-tabix. " Check here
* Select BRGEW from LIPS
SELECT SUM( BRGEW )
INTO L_BRGEW
FROM LIPS
WHERE
VBELN = T_VTTp-VBELN .
IF SY-SUBRC EQ 0.
L_BRGEW_TOT = L_BRGEW_TOT + L_BRGEW.
read table outtab with KEY = 'WEIGHT'. " Check here
if sy-subrc = 0. " Check here
outtab-value = L_BRGEW_TOT.
modify outtab index L_tabix. " Check here
endif.
ENDIF.
endlloop. " Check here
‎2007 Mar 06 2:10 PM
Hi Friends,
This is solved .
i have followed some other logic - define one character variable.
pass the variable to this character field and condense this.
then pass it to outtab-value.
This will solve the problem.
thank you all friends for your valuable time.
‎2007 Mar 06 1:38 PM
hai praveen...
can u explain the problem more clearly.....
suresh....
‎2007 Mar 06 1:42 PM
Hi Suresh,
i have outtab with only one parameter weight.
i have written the above code for the subroutine.
of course - everything i', getting right, but i couldn't get the outtab-value populated.
please look into this and help me.
Thanks
‎2007 Mar 06 1:40 PM
Hi praveen,
i do it in this way:
READ TABLE OUT_TAB WITH KEY = 'ZEIVR'. "Variable which i will update
OUT_TAB-VALUE = MARA-ZEIVR.
MODIFY OUT_TAB INDEX SY-TABIX.
in your example:
read table outtab with key c_weight.
outtab-value = L_BRGEW_TOT.
modify outtab index sy-tabix.
Regards, Dieter
‎2007 Mar 07 10:55 AM