cancel
Showing results for 
Search instead for 
Did you mean: 

Processing Inbound IDOC - Function module IDOC_INPUT_INVOIC_MRM ?!?!

Former Member
0 Kudos

Hi experts,

I created a copy from IDOC_INPUT_INVOIC_MRM(function module to process the inbound idoc with idoc type INVOIC01) to Z_IDOC_INPUT_INVOIC_MRM .

I used 2 transactions:

>BD51 - Maintain Attributes

>WE57 - Assign IDoc Type and Message Type

for this new function module.

Next step, I tested function module Z_IDOC_INPUT_INVOIC_MRM by use the transaction we19. The invoice was not generated the same of testing with function module IDOC_INPUT_INVOIC_MRM.

Anyone can tell me why?

(2 functions module is the same source code)

Thanks,

Gy

Accepted Solutions (0)

Answers (1)

Answers (1)

prabhu_s2
Active Contributor
0 Kudos

what was the error? check in we02 and post on the error

Former Member
0 Kudos

Hi,

The message error in the idoc:

"

G/L account 580100 not created (please check your input)

Message no. ME042

"

Thanks,

Gy

prabhu_s2
Active Contributor
0 Kudos

try to create a g/l acount by feeding in the values mannualy. once u are able to do so then u will find the root coause of the error. maybe u need to check whether ur user id has the authorization

Former Member
0 Kudos

Hi,

Thank for your help.

The error was generated cause the G/L account number is wrong(0000580100 not 580100).

An other way, how i can create a billing document after the invoice was generated?

Source code to generate invoice:

*append G/L account to internal table tco

lw_tco-KOKRS = 'xxxxx'.

lw_tco-KOSTL = 'xxxxx'.

lw_tco-SAKNR = 'xxxxxxxx' .

lw_tco-BUKRS = 'xxxx'.

lw_tco-SHKZG = 'S'.

append lw_tco to tco.

----- Erzeugung des Rechnungsbelegs, IDOC-Status fortschreiben -


IF mrm_subrc = 0.

PERFORM mrm_invoice_create TABLES tfrseg " Exporting

tco " Exporting

tma " Exporting

idoc_status " Importing

USING mrm_rbkpv

mrm_idoc_contrl

mrm_poskorr

f_zahlbed

CHANGING mrm_belnr

mrm_gjahr

mrm_subrc.

ENDIF.

*Add code to generate billing document

.........???

Thanks,

Gy

prabhu_s2
Active Contributor
0 Kudos

use a bdc to create the billing documents if f/n modules doesnt help

Former Member
0 Kudos

Hi,

I found a BAPI function to supporting for create billing document: BAPI_BILLINGDOC_CREATEFROMDATA , but I don't know how to get the sale order.

Could you please help me to use this BAPI function.

Thanks,

Gy

prabhu_s2
Active Contributor
0 Kudos

vbak is the header table for sale order and vbap is the line item table. if u want to create a sale order then there also exists a bapi