05-17-2006 5:26 AM
Hai guys,
<b>
TYPES: BEGIN OF TY_MAPP,
AVBUND LIKE LIKP-VBUND,
AVBELN LIKE LIKP-VBELN,
AXBLNR LIKE LIKP-XBLNR,
AWADAT_IST LIKE LIKP-WADAT_IST,
ALFDAT LIKE LIKP-LFDAT,
AVKORG LIKE LIKP-VKORG,
AERNAM LIKE LIKP-ERNAM,
END OF TY_MAPP.
IT_MAPP TYPE TABLE OF TY_MAPP,
TW_MAPP LIKE LINE OF IT_MAPP,
IT_MAPP1 TYPE TABLE OF TY_MAPP,
TW_MAPP1 LIKE LINE OF IT_MAPP1.
SELECT VBELN FROM VBUP INTO TABLE IT_MAPP1
FOR ALL ENTRIES IN IT_MAPP
WHERE VBELN = IT_MAPP-AXBLNR+0(10).
ABOVE CODE GIVING COMPILE ERROR."FOR ALL ENTRIES IN IT_MAPP"
</b>
How to use INTERNAL TABLE HERE.
Also please confirm me whether belwo check is correct or not
>>> WHERE VBELN = IT_MAPP-AXBLNR+0(10).
THanks in advance.
Ambichan
05-17-2006 5:52 AM
Add one field vbeln in IT_MAPP internal table.
then do
loop at it_mapp.
it_mapp-VBELN = IT_MAPP-AXBLNR+0(10).
modify it_mapp tranporting vbeln.
endloop.
then use for all entries IT_MAPP-vbeln directly.
Hope this will solve ur problem.
regards
vinod
05-17-2006 5:30 AM
The select needs some slight changes:
SELECT VBELN as avbeln FROM VBUP INTO corresponding fields of TABLE IT_MAPP1 FOR ALL ENTRIES of IT_MAPP WHERE VBELN = IT_MAPP-AXBLNR+0(10).
The check is ok as long as IT_MAPP-AXBLNR+0(10) containsa VBELN.
05-17-2006 5:36 AM
u select vbeln into table it_mapp1 but where this field in it_mapp1.
can u send the complete loop ststement and what u want to do.......
05-17-2006 6:14 AM
Hey neil&kishan,
I am still getting error.
I have selected records from LIKP and LIPS and PUT in internal table IT_MAPP.
Now i want to extract records from VBUP comparing IT_MAPP table using
VBUP-VBELN = IT_MAPP-AXBLNR+0(10) and VBUP-VBSTX <> 'C'condition.
Please suggest me how to do this.
SHould i have to write below query in Internal table loop or what.
SELECT VBELN as avbeln FROM VBUP INTO corresponding fields of TABLE IT_MAPP1 FOR ALL ENTRIES of IT_MAPP WHERE VBELN = IT_MAPP-AXBLNR+0(10)AND WBSTX <> 'C'.
Below is internal table structure.
TYPES: BEGIN OF TY_MAPP,
AVBUND LIKE LIKP-VBUND,
AVBELN LIKE LIKP-VBELN,
AXBLNR LIKE LIKP-XBLNR,
AWADAT_IST LIKE LIKP-WADAT_IST,
ALFDAT LIKE LIKP-LFDAT,
AVKORG LIKE LIKP-VKORG,
AERNAM LIKE LIKP-ERNAM,
END OF TY_MAPP.
TYPES: BEGIN OF TY_MAPP1,
AVBELN LIKE LIKP-VBELN,
END OF TY_MAPP.
DATA :
IT_MAPP TYPE TABLE OF TY_MAPP,
TW_MAPP LIKE LINE OF IT_MAPP,
IT_MAPP1 TYPE TABLE OF TY_MAPP,
TW_MAPP1 LIKE LINE OF IT_MAPP1.
Thanks
Ambichan.
05-17-2006 6:16 AM
Hi AMbi,
exactly what is the error you're getting?
there is a slight error in your select still, missing a space before the AND:
SELECT VBELN as avbeln FROM VBUP INTO corresponding fields of TABLE IT_MAPP1 FOR ALL ENTRIES of IT_MAPP WHERE VBELN = IT_MAPP-AXBLNR+0(10) AND WBSTX <> 'C'.
05-17-2006 6:24 AM
y ru taking xblnr(rf. doc) n comparing with vbeln...
i think try to comapare.. vgbel from lips(Document number of the reference document),
05-17-2006 6:41 AM
Hey guys,
Thanks for all supporting me.
I solved the problem by following below method.
loop at it_mapp.
it_mapp-VBELN = IT_MAPP-AXBLNR+0(10).
modify it_mapp tranporting vbeln.
endloop.
then use for all entries IT_MAPP-vbeln directly.
I will reward points to all and close the thread.
AMBICHAN
05-17-2006 5:52 AM
Add one field vbeln in IT_MAPP internal table.
then do
loop at it_mapp.
it_mapp-VBELN = IT_MAPP-AXBLNR+0(10).
modify it_mapp tranporting vbeln.
endloop.
then use for all entries IT_MAPP-vbeln directly.
Hope this will solve ur problem.
regards
vinod
05-17-2006 5:58 AM
HI ambi,
1. Its just a WARNING Message (and not an error)
2. The warning message comes bcos
VBELN of VBUP is 10 char
and AXBLNR in internal table is 25 char.
regards,
amit m.