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: 

PERFORM beleg_lesen_direkt(sapmv50a) USING likp-vbeln Returns empty XLIKP

Former Member
0 Kudos

Hi Experts.

I was trying to update a quantity of an inbound delivery using BAPI BAPI_INB_DELIVERY_CHANGE

Inside the process during my debug, once inside FM WS_DELIVERY_UPDATE_2,

It performs this subroutine PERFORM beleg_lesen_direkt(sapmv50a) USING likp-vbeln.

Inside the form:

FORM BELEG_LESEN_DIREKT USING IF_VBELN LIKE LIKP-VBELN.

  LIKP-VBELN = IF_VBELN.

  PERFORM BELEG_LESEN.

ENDFORM.

After PERFORM BELEG_LESEN, Internal table XLIKP and XLIPS have entries.

But once you get out of the form FORM beleg_lesen_direkt after pressing F5,

XLIKP and XLIPS entries are gone. There were no Refresh/Clear that the process have passed thru.

That is why when the process returns to my program, it is only returning an error message "Items does not exists".

But in SM37, when I tested FM WS_DELIVERY_UPDATE_2, XLIKP and XLIPS does not loses their value after the same scenario.

I'm wishing you can help me with this issue.

Thank you very much in advance.

Regards,

Rex

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rex,

The FM is perfectly fine as it is quite old and almost all bugs are rectified so ... please you would check be doing some error in passing the data.

BAPI_INB_DELIVERY_CHANGE | SCN

Regards

6 REPLIES 6

Former Member
0 Kudos

First, Did you read the FM documentation closely?

Neal

Former Member
0 Kudos

Hello Rex,

Once you reach the subroutine BELEG_LESEN and find the entries filled in XLIKP and XLIPS,

place a watch point on the fields XLIKP-VBLEN and XLIPS-VBELN before coming out of the subroutine.

You will get to know where exactly the tales are getting cleared.

Former Member
0 Kudos

Hi Rex,

The FM is perfectly fine as it is quite old and almost all bugs are rectified so ... please you would check be doing some error in passing the data.

BAPI_INB_DELIVERY_CHANGE | SCN

Regards

raymond_giuseppi
Active Contributor
0 Kudos

In you debug did you confuse (SAPLV50S)XLIKP[] and (SAPMV50A)XLIKP[], try to display both internal tables.

Regards,

Raymond

Former Member
0 Kudos

Hi Rex,

Did you get a solution to your problem?

I am facing the exact same problem at the exact location.

(SAPMV50A)XLIPS[] get the rows, but (SAPLV50S)XLIPS[] does not.

I have a feeling it is due to the Includes with the COMMON PART stuff.

I created a custom function for batch determination.

I have the includes like VBLKDATA, VBLPDATA etc. in this function's global data.

I call the batch determination function first, followed by the BAPI.

I go through the problem you are encountering.

If I don't call the batch det. function (hardcoded the batch info in the ITAB I am using), and call the BAPI directly, then the BAPI functions as desired.

Any help would be greatly appreciated.

I believe I am missing something basic here.

Thank you.

With best regards,

-Ramesh

0 Kudos

Hello Rex,

I think there is a problem with global/common references. Special gobals (normally I know this only for elements defined by TABLES) are automatically referenced to similar elements of the caller. But only once at "load of program". If A and B will call C then elements of C will reference to A only if this calls firsts. If the very old ABAP code uses this method then it can only be solved by letting A and B reference to D or you will call the FM/BAPI with "STARTING NEW TASK".

But XLIPS is defined with OCCURS 15?! So I am astonished too. It is a stupid COMMON PART. You can solve this in the same way...

Use INCLUDE VBLPDATA in your main program. So all function groups will reference to the same elements.

Best regards

Andreas