I have the following requirement.
Build Approach: For all the orders generated in a day, we have to take all the orders , fetch the line item of each order , take the material and the site
1] Now for each order line items, take the site (VBAP-WERKS) and fetch the customer number of site (LOCNR) from the table WSOK. Then take this LOCNR and find ASORT (Assortment) from the table WRSZ.
2] For each order line items, take the article number (VBAP-MATNR).
3] Make a select query from the table VBEP by giving the order number (VBELN), item number (POSNR) and fetch the material availability date (VBEP-MBDAT)
4] select the item creation date (VBAP-ERDAT) for the line item of a particular order.
After the first step, we have to go to the transaction WSL1 where we have to give article number (Found in step 1), assortment code (Found in step 1), valid on (Current date) and valid to (Found in step 1).
If article is listed then we have to check for the next article.
If article is not listed then we have to go to the transaction WSP4 and list them.
1. WSL1 is a standard report program (RWSORT01). The output of this transaction (report) is ALV report. Now in the main program how we come to know that for the input material , the output is generated or not?
2. Secondly, if some messages are POP UP then how to handle that message from this program?
3. If the material is not listed, then we have to list that material in WSP4 transaction which is also basically a report program (RWSORT14). While listing the material, some pop up message will come. How to handle this situation?
Your help is higly appreiciated.