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

billng document creation using bdc

Former Member
0 Likes
1,156

hi experts,

I've been using bapi for sales order and outbound delivery creation. But for billing document i'm using BDC. it's simpler. The creation of sales order and outbound delivery has no problem. The problem is upon creation of the billing document, it only creates the last entry in the item level. Example, if item has 10,20, and 30; it will only create item 30 in the billing document level. But no problem with the sales order and outdel. What could i be missing here?

Thank you in advance!

6 REPLIES 6
Read only

Former Member
0 Likes
1,030

hi,

In the bdc, the step where you are creating line items, are you sure you loop on the table containing the line items for teh same billing document?. The process needs to be repeated for all of them.Probably the data is being over written so only the last entry is being passed.Try and debug it and see, what goes into bdcdata table.

Read only

0 Likes
1,030

Hi,

Im actually not very particular on where in the bdc code the line items are being processed. the only variable that I see here is the outbound del number which is g_odnum. Here is the BDC code.

f_bdc_dynpro 'SAPMV60A' '0102'.
      f_bdc_field  'BDC_CURSOR' 'KOMFK-VBELN(01)'.
      f_bdc_field  'BDC_OKCODE' '/00'.
      f_bdc_field  'KOMFK-VBELN(01)' g_odnum.
      f_bdc_dynpro 'SAPMV60A' '0104'.
      f_bdc_field  'BDC_CURSOR' 'VBRK-FKART'.
      f_bdc_field  'BDC_OKCODE' '=SICH'.
      f_bdc_transaction 'VF01'.

Can you help me identify where it is in this BDC code?

Thanks for you help!

Read only

0 Likes
1,030

Hi, the screen points to the screen 102 for creating teh line items of billing document.

Now the BDC has "'KOMFK-VBELN(01)'"

here 01 specifies the line item no.

This implies KOMFK-VBELN is always pointing on line item no 1. If you wish to pass your value to other line items,you need to create a counter and assign it to KOMFK-VBELN.

hope it helps.

Read only

0 Likes
1,030

hi,

Sorry for the late reply. It has been so long since i've got to this issue again. The problem actually is that upon billing document creation, it only reads the item levels from outbound delivery with item category TANN. It does not read those with category TAN. What am I missing here?

Thank you in advance!

Read only

0 Likes
1,030

Is there any special reason for writing BDC. SAP provided a program- RV60SBAT. Set the required variants and schedule this program so create billing documents.

TANN is free of charge items, generally this will not to billing unless you want this to posted for statistical purposes.

Ask your SD functional team member to check related to item categories and their process of posting billing documents.

Read only

0 Likes
1,030

Hi,

Actually when using category TANN, billdoc is successfully created. Im having problems with TAN category. On the BDC recording, i dont see any difference if we used TAN or TANN. What could be the possible problem?

Thank you in advance