‎2011 Sep 14 4:08 PM
Hi All,
Iam trying to to create billing document using BDC for VF01 with sales order. For single line item it is working fine and that to in Mode 'A'. But while creating invoices using multiple sales orders , Iam getting the following error.
No batch input data for screen 'SAPMV60A' '0102' . Error - 0344.
Kindly help me as I was strucked here.
My code .
PERFORM bdc_dynpro USING 'SAPMV60A' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMFK-VBELN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMFK-VBELN(01)'
gwa_bdc-vbeln.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
REFRESH messtab[].
CALL TRANSACTION 'VF01' USING bdcdata
OPTIONS FROM wa_options
MESSAGES INTO messtab.
Please <removed by moderator> help.
Thanks ,
Srikanth.A
Edited by: Thomas Zloch on Sep 15, 2011 1:47 PM
‎2011 Sep 14 4:48 PM
Hi Srikanth,
When you go for multiple line items you have to do the loop else it will consider singe record.I will suggest to check for bapi or fm to create invoice.
Regards,
Madhu.
‎2011 Sep 15 6:13 AM
Hi Madhu,
Thanks for your reply .
It is already in the loop only. I have not given in the code above. Could you suggest any BAPI of FM for creating invoice based on Sales order as it should create a credit note.
Thanks,
Srikanth.A
‎2011 Sep 15 6:23 AM
Hi Srikanth,
Check with RV_INVOICE_DOCUMENT_ADD.There is no documentation available for this.Pass all the import and table parameters and create an invoice.Check and post if there is any issue.
Regards,
Madhu.
‎2011 Sep 14 5:43 PM
Hi
You are passing the second record to the first row of the Docs table control. Because of which you are not able to get other SOs to be entered
data : lv_index type char1,
lv_vbeln type char15.
lv_index = sy-tabix.
lv_vbeln = 'KOMFK-VBELN(01)'.
lv_VBELN+15 (1) = LV_INDEX.
PERFORM bdc_field USING lv_VBELN
gwa_bdc-vbeln.
Shiva
‎2011 Sep 15 7:52 AM
HI Siva,
Thanks for your reply.
I have to create one invoice for one sales order. i.e One credit note for one credit memo. All credit memo's are looped and inside the loop I have written BDC as above. For each iteration one invoice to be created.
Please <removed by moderator> help.
Thanks,
Srikanth.A
Edited by: Thomas Zloch on Sep 15, 2011 1:47 PM
‎2011 Sep 15 12:52 PM
What are you actually doing at screen 'SAPMV60A' '0104'.
I dont have any input fields there. I do not even get this screen when I do a recording for VF01
My process steps are
VF01 -> enter invoice type, invoice date, enter delivery number --> save
I think the code part you included is not the complete code, so it is impossible to know if you perform the 'SAPMV60A' '0102' just once or for any record.
‎2011 Sep 16 6:12 AM
Hi Jurgen,
Thanks for your response. I need not give invoice type and date instead need to give only sales order which is credit memo at VF01 initial screen and press enter and save. so it will create a credit note.
Thanks,
Srikanth.A
‎2011 Sep 16 6:26 AM
Hi Jurgen
LOOP AT git_bdc INTO gwa_bdc.
refresh messtab[].
PERFORM bdc_dynpro USING 'SAPMV60A' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMFK-VBELN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMFK-VBELN(01)'
gwa_bdc-vbeln.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV60A' '0104'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBRK-FKART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
REFRESH messtab[].
CALL TRANSACTION 'VF01' USING bdcdata
OPTIONS FROM wa_options
MESSAGES INTO messtab.
Error message population....
REFRESH bdcdata[].
ENDLOOP.
Thanks,
Srikanth.A