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

SD/MM Query

Former Member
0 Likes
1,047

Hi all,

Greeting all. Apparently, I'm searching a clue (perhaps a way) to accomplish the following:

I have a third party system, which will create PO (Purchase Order) and SO (Sales Order), will pass the said PO/SO to SAP system via abap interface program, and populate the document number to respective table/structure as below:

PO document number -> EKKO_CI-ZZPO_NO

SO document number -> VBAK-ZZSO_INV

Therefore, the above PO/SO will only appear in Purchase Order and Sales Order.

What I need to enchance is that; I would need the original PO/SO number to be appeared in the follow-up documents, e.g. Good Receipts, Service Entry, Invoice Receipt, FI Documents, Billing Document, and Accounting Document.

Any piece of advise is much appreciated.

Many thanks and regards,

Patrick

P/S: Reward Point Guaranteed.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
761

> I have a third party system, which will create PO

> (Purchase Order) and SO (Sales Order), will pass the

> said PO/SO to SAP system via abap interface program,

> and populate the document number to respective

> table/structure as below:

>

> PO document number -> EKKO_CI-ZZPO_NO

> SO document number -> VBAK-ZZSO_INV

>

> Therefore, the above PO/SO will only appear in

> Purchase Order and Sales Order.

>

> What I need to enchance is that; I would need the

> original PO/SO number to be appeared in the follow-up

> documents, e.g. Good Receipts, Service Entry, Invoice

> Receipt, FI Documents, Billing Document, and

> Accounting Document.

This done by "Kopiersteuerung", which can be find in the customizing. For example Transaktion VTLA copying fields from sales order to delivery.

You can create a "kopierbedingung" with your on ABAP-code.

If you have a system newer than 46B use the group field in your appends of database tables like vbak, than you can copy all fields in one line.

Create an include append it to vbap and lips and your coding should look like:

lips-zzvcsdinc = cvbap-zzvcsdinc.

Example

Copy Routine RV50C904


 FORM - Routine for data transfer of order header data         *
*---------------------------------------------------------------------*

*---------------------------------------------------------------------*
*       FORM DATEN_KOPIEREN_904                                       *
*---------------------------------------------------------------------*
*                                                                     *
*       Order Header                                                  *
*                                                                     *
*       The following work areas are available:                       *
*                                                                     *
*        LIKP - Header of the delivery                                *
*       CVBAK - Header of the reference document                      *
*                                                    

FORM DATEN_KOPIEREN_904.

  LIKP-VKORG = CVBAK-VKORG.

  LIKP-AUTLF = CVBAK-AUTLF.
  LIKP-VSBED = CVBAK-VSBED.
  LIKP-FKARV = TVAK-FKARV.
  LIKP-TRAGR = MAAPV-TRAGR.

* And now something with Z-fields
select single zzakkre from knb1 into zzzzakkre where
                      kunnr = zzkunrg and
                      bukrs = '101'.      " Don't try this at home kids
likp-zzakkre = zzzzakkre.

Hi all,

Greeting all. Apparently, I'm searching a clue (perhaps a way) to accomplish the following:

I have a third party system, which will create PO (Purchase Order) and SO (Sales Order), will pass the said PO/SO to SAP system via abap interface program, and populate the document number to respective table/structure as below:

PO document number -> EKKO_CI-ZZPO_NO

SO document number -> VBAK-ZZSO_INV

Therefore, the above PO/SO will only appear in Purchase Order and Sales Order.

What I need to enchance is that; I would need the original PO/SO number to be appeared in the follow-up documents, e.g. Good Receipts, Service Entry, Invoice Receipt, FI Documents, Billing Document, and Accounting Document.

Any piece of advise is much appreciated.

Many thanks and regards,

Patrick

P/S: Reward Point Guaranteed.

4 REPLIES 4
Read only

Former Member
0 Likes
761

The way usually we take care of similar situations where we get numbers from external systems is to update the text in the Order documetns and have the rules configured to copy over the particular text to subsequent documents.

Regards

Anurag

Read only

Former Member
0 Likes
761

Hi Patrick,

When you have already updated PO/SO in SAP Database, the number will be available for the subsequent documents also, so you need not worry about that it will be done automatically.

Regards:-

Santosh.D

Read only

Former Member
0 Likes
762

> I have a third party system, which will create PO

> (Purchase Order) and SO (Sales Order), will pass the

> said PO/SO to SAP system via abap interface program,

> and populate the document number to respective

> table/structure as below:

>

> PO document number -> EKKO_CI-ZZPO_NO

> SO document number -> VBAK-ZZSO_INV

>

> Therefore, the above PO/SO will only appear in

> Purchase Order and Sales Order.

>

> What I need to enchance is that; I would need the

> original PO/SO number to be appeared in the follow-up

> documents, e.g. Good Receipts, Service Entry, Invoice

> Receipt, FI Documents, Billing Document, and

> Accounting Document.

This done by "Kopiersteuerung", which can be find in the customizing. For example Transaktion VTLA copying fields from sales order to delivery.

You can create a "kopierbedingung" with your on ABAP-code.

If you have a system newer than 46B use the group field in your appends of database tables like vbak, than you can copy all fields in one line.

Create an include append it to vbap and lips and your coding should look like:

lips-zzvcsdinc = cvbap-zzvcsdinc.

Example

Copy Routine RV50C904


 FORM - Routine for data transfer of order header data         *
*---------------------------------------------------------------------*

*---------------------------------------------------------------------*
*       FORM DATEN_KOPIEREN_904                                       *
*---------------------------------------------------------------------*
*                                                                     *
*       Order Header                                                  *
*                                                                     *
*       The following work areas are available:                       *
*                                                                     *
*        LIKP - Header of the delivery                                *
*       CVBAK - Header of the reference document                      *
*                                                    

FORM DATEN_KOPIEREN_904.

  LIKP-VKORG = CVBAK-VKORG.

  LIKP-AUTLF = CVBAK-AUTLF.
  LIKP-VSBED = CVBAK-VSBED.
  LIKP-FKARV = TVAK-FKARV.
  LIKP-TRAGR = MAAPV-TRAGR.

* And now something with Z-fields
select single zzakkre from knb1 into zzzzakkre where
                      kunnr = zzkunrg and
                      bukrs = '101'.      " Don't try this at home kids
likp-zzakkre = zzzzakkre.

Read only

0 Likes
761

Hi all,

Thanks for your info, however, I am now searching an user exit to actually accomplish the following (MM Module):

1) SAP system will capture 3rd party PO number to EKKO_CI-ZZPO_NO during the BDC interface program of PO creation. The third party PO number flow successfully from PO -> Service Entry -> Goods Receipt -> Accounting Document -> FI Posting.

2) When the time I run transaction MIRO/MIR7 (Invoice Receipt-IR -> Accounting Document -> FI Posting), I do not have my 3rd party PO number appear in my invoice line item, thus, Accounting Document will not display the line item respectively together with 3rd party PO number during posting.

Is there any user exit that you guys can suggest to accomplish the above, where I can actually grasp the external PO number from EKKO to IR line item? Same goes to accounting document posting in SD module.

Appreciate your help guys.

Many thanks,

Patrick