Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding For ALL entries table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

vinod_gunaware2
Active Contributor
0 Kudos

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

8 REPLIES 8

former_member186741
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.......

0 Kudos

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.

0 Kudos

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'.

0 Kudos

y ru taking xblnr(rf. doc) n comparing with vbeln...

i think try to comapare.. vgbel from lips(Document number of the reference document),

0 Kudos

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

vinod_gunaware2
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.