AUTOMATION OF GR AGAINST PO AND PICKING, PGI FOR SALES ORDER DELIVERY CREATION
Requirement: An automation requested from client for posting GR against purchase order of Delivery at PGI and delivery creation, picking for the sales order. The following is the flow chart of the requirement.
First, we must create an output type for our delivery in our case we can consider the output type as ZXXX.
In the processing routine of the output type medium should be “Special function”, give the program name and the form name.
Create a routine, VOFM->Output control and assign it for V2 in sales and activate it.
we need to change the dispatch time of our output type ZXXX to “Send with periodically scheduled job” avoid lock object issue.
As this is an automation process we must create a periodical job which should execute at the time of triggering an event.
We need to create an event for this using the transaction SM62.
Create an RFC functional module which contains the FM to trigger the event, this RFC FM will be called in the routine at the time of PGI.
Once the PGI is done the output type ZXXX will be in ready to process state. The RFC FM triggers the event which in turn executes the BG job and the output is processed successfully.
The following are the required screen shots.
Logic in VOFM routine:
RFC FM which is called in the routine
Use Job wizard to create a BG Job.
Give the Job name
Select ABAP program step.
Give program name as RSNAT00 and saved variant name
Select After event option
Give Event name created in SM62 and check periodically option.
The periodically option is selected to trigger the Job whenever the event is triggered.
Complete the process.
Requested output is achieved.