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: 

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

Former Member
0 Kudos

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!

2 REPLIES 2

Former Member
0 Kudos

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

Jelena
Active Contributor
0 Kudos

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