Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member1716
Active Contributor


Hi All Experts,

In this blog i would like to explain on achieving the requirement of copying of data from contract while creating Billing requests from DP90.

Introduction :

We create Billing requests through DP90 either using the contract or the service order. During this creation we may expect the data from the referenced contract or service order to flow to the created BR. But this does not happen ideally. It is seems that the BRs are created newly.

This Blog will help you in understanding on how to control the data from the referenced contract to the created BR.

Copy of Data from referenced contract or service order:

With reference to flow of data from the referenced object there are two sets of data as given below:

1) Header Data.

2) Item Data.

Both these data must be handled seperately to ensure it flows to the newly created BR.

Copy of header data:

If you have a look at the standard configuration for contract data in T-code VTAA, you will find a standard routine 101 is assigned to "Contract PO Copy HDR" as shown below (Routine numbers are shaded),



If you go through the standard code of routine 101 you will find several clear statements for many fields as shown below, this actually prevents the header data getting copied to the BR. All you have to do is create a custom routine with the same code and comment out the clear statement for which you need the data to be carried and now replace your newly created routine with 101 in the T-code VTAA.

Please note that there will be statements for the fields with keywords LOCAL and CLEAR, you have to comment out both the statements for the same field.





This will ensure Header data is copied to Created BR.

Copy of item data:

 

In case of Item data the values will still not be copied even though you comment out the code as shown above, this is because the item data are newly created and it is not created with reference to the contract.

Please have a look into SAPNOTE 209868 for reference.

To achieve the requirement of copying the item data, we need to use the userexit EXIT_SAPLV46H_001 to acheive the requirement. Just create a project in CMOD with below details,

Enhancment name = V46H0001

Use the structure C_VBAPKOM to pass the values during BR creation for line items, the exit gets called for each line getting created.

There are other structures with other uses, please have a check before implementing your requirement.

Summary:

Hope this gives a clear picture on how to copy the referenced contract data to the BR that  is created through it from T-Code DP90. Please get back in case any further clarifications needed.

Please provide your valuable comments on the Blog, which will serve as a source of encouragement.

I would like to mention in the below spaces:

ABAP Development    SAP ERP Sales and Distribution (SAP SD)ABAP Development

Thanks to SCN once again for all those commendable efforts it has made till now. :smile:

  “Lets LEARN and COLLABRATE in SCN” :smile: :smile: :smile:


Thanks and Regards,

Satish Kumar Balasubramanian

2 Comments