Application Development 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: 

Invoice Auto Post

Former Member
0 Kudos
165

HI friends,

I have a requirement to Auto Post an Invoive.

I am planning on using function Module MRM_INVOICE_READ to get the invoice header data and then use the header and line item data and pass to FM MRM_PARKED_INVOICE_POST to post the invoice.

Please let me know if this looks good.

Also any examples programs for the above requirement.

Thanks,

Ster

1 ACCEPTED SOLUTION

Former Member
0 Kudos
83

Check the example code :

CALL FUNCTION 'MRM_INVOICE_READ'

EXPORTING

i_belnr = i_rbkp-belnr

i_gjahr = i_rbkp-gjahr

i_xselk = 'X'

i_buffer_on = 'X'

IMPORTING

e_rbkpv = mrm_rbkpv

TABLES

t_drseg = ydrseg.

PERFORM parked_document_post USING mrm_rbkpv

ydrseg[]

i_editor.

FORM parked_document_post USING

i_rbkpv TYPE mrm_rbkpv

ti_drseg TYPE mmcr_tdrseg

i_editor TYPE REF TO c_textedit_control.

DATA: s_drseg TYPE mmcr_drseg.

CALL FUNCTION 'MRM_PARKED_INVOICE_POST'

EXPORTING

i_rbkpv = mrm_rbkpv

ti_drseg = ydrseg[]

i_editor = i_editor

EXCEPTIONS

error_message = 01

OTHERS = 02.

It should work

Thanks

Seshu

2 REPLIES 2

Former Member
0 Kudos
84

Check the example code :

CALL FUNCTION 'MRM_INVOICE_READ'

EXPORTING

i_belnr = i_rbkp-belnr

i_gjahr = i_rbkp-gjahr

i_xselk = 'X'

i_buffer_on = 'X'

IMPORTING

e_rbkpv = mrm_rbkpv

TABLES

t_drseg = ydrseg.

PERFORM parked_document_post USING mrm_rbkpv

ydrseg[]

i_editor.

FORM parked_document_post USING

i_rbkpv TYPE mrm_rbkpv

ti_drseg TYPE mmcr_tdrseg

i_editor TYPE REF TO c_textedit_control.

DATA: s_drseg TYPE mmcr_drseg.

CALL FUNCTION 'MRM_PARKED_INVOICE_POST'

EXPORTING

i_rbkpv = mrm_rbkpv

ti_drseg = ydrseg[]

i_editor = i_editor

EXCEPTIONS

error_message = 01

OTHERS = 02.

It should work

Thanks

Seshu

0 Kudos
83

Thanks Seshu.