Application Development and Automation 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: 
Read only

Automatic PGI and Invoice creation

Former Member
0 Likes
2,298

Hi Friends,

I had a requirement in SD area where once we create sales order, the PGI and Invoice process should run in the background ( Automation Process). The scenario here is -- when we create sales order, the delivery document also gets generated.

My approach -- for PGI and Invoice process, I need to develop the BAPIs. ( for Post Goods Issue and Invoice creation).

After the creation of BAPIs, I need to call these bapis in the standard sales order creation process.

Searched the forum on this issue. But cant find the appropriate answers.

Please suggest me the solution for this issue.

Murali Krishna. T

Hi Friends,

I had a requirement in SD area where once we create sales order, the PGI and Invoice process should run in the background ( Automation Process). The scenario here is -- when we create sales order, the delivery document also gets generated.

My approach -- for PGI and Invoice process, I need to develop the BAPIs. ( for Post Goods Issue and Invoice creation).

After the creation of BAPIs, I need to call these bapis in the standard sales order creation process.

Searched the forum on this issue. But cant find the appropriate answers.

Please suggest me the solution for this issue.

Murali Krishna. T

4 REPLIES 4
Read only

Former Member
0 Likes
1,303

Hi Marali,

I think the idea which you are telling of creating bapi is good, you can just create bapi call it in any report, the same report you submit in any of badi or enhacment of user exit for sales order creation and trigger it once sales order is created, cath the delivery document at runtime, you will find it in any ofdynamic internal table.

I have done the same in case of MIGO triggered something once the document is posted using BADI.

Regards

Sagar

Read only

Former Member
0 Likes
1,303

Hi,

Once order creation done, using custom program we can created delivery,PGI and generate billing document for the same using these BAPI's.

BAPI_DELIVERYPROCESSING_EXEC - For Delivery Creation

WS_LM_GOODS_MOVEMENT - For PGI

BAPI_BILLINGDOC_CREATEFROMDATA - Creating Billing Document

Let me know further assistance required for the same.

Regards,

Bysani.

Read only

brad_bohn
Active Contributor
0 Likes
1,303

You don't call anything else from the standard sales order process. Sales order creation stands alone; every other process is a subsequent process. Automatic delivery creation can be implemented by sales document type config, which it sounds like you already have in place, or you're using the delivery due list. You also don't need another program for billing doc creation; use the billing due list program scheduled at certain intervals.

The limitation on billing is the PGI if your copy control specifies that you can't bill until PGI occurs. I don't understand why you would do this automatically, without confirmation that the shipment has left your warehouse. If your items aren't really relevant for PGI, then you can configure them that way so that it's not required. However, auto-picking and auto-packing are done via delivery output determination code using the functions WS_DELIVERY_UPDATE_*. You might also try to PGI the delivery there as well with WS_DELIVERY_UPDATE. Otherwise, just use table drop and trigger the WS_DELIVERY_UPDATE function for the PGI from a custom program; you can then run billing due as a second step in the job.

Read only

Former Member
0 Likes
1,303

Hi Krishna,

Instead of using a BADI, why dont you make a program(or use standard program) and run it periodically in the background e.g. every 5 mins.

Regards,

Jovito.