Skip to Content

trying to pull the entire simulation table of CO09 into an internal table

Sep 20, 2017 at 07:07 PM


avatar image
Former Member

Hi gurus,

I am trying to pull the entire simulation table of CO09 into an internal table by utilizing the AVAILABILITY_CHECK function module. I found a couple threads suggesting it was possible, but I did not discover a solution and am unsure which all parameters I need to pass. From my initial testing, all I am able to return is a single line instead of all the lines.

From debugging the actual CO09 screen, I can see the data in ATPDEX[] of /SAPAPO/SAPLATP4. I am just trying to get that same data into an internal table so that I can manipulate it into a user requested display (report program).

Appreciate any help as always!

co09.jpg (107.2 kB)
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you. Not sure how it got the mobile app tag applied. Also not sure why it has been downvoted.

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jelena Perfiljeva
Oct 05, 2017 at 09:02 PM

There is BAPI_MATERIAL_AVAILABILITY but I don't think it'll return the same results as CO09 either. The thing is - in SAP it's not like there is a function to do the same exact thing as every transaction does. (I guess separation of concerns was not the thing in the 1970s.)

I'm not sure what kind of report you're writing (and this could be a reason for the downvote) but IMHO such granularity level just doesn't make a lot of sense to display for the whole bunch of materials at once. Maybe you could just display some general ATP information and/or stock on-hand and then provide double-click functionality with CALL TRANSACTION (and skip 1st screen) to take the users to CO09 for drill-down.

Otherwise you're essentially looking at reverse-engineering CO09 and putting the same code into a custom program.

Mind you, ATP check could take some time, so if you try to put BAPI or FM in a loop it might as well kill the performance for your report. I'd really go back to the drawing board on this one. Seriously doubt that exactly the same info as CO09 is what the users actually want...

10 |10000 characters needed characters left characters exceeded