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: 

Repeporting country while posting document by IDOC INVOIC01

Former Member
0 Kudos

Experts,

I have one requirement where invoice document is being posted via FB01 using INVOIC01 IDOC.

When this IDOC is processed one document is posted, My requirement is to populate Reporting Country at item level (Which comes in addition data tab).

I have searched a lot before posting this thread. Could you please suggest how to achieve the same.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Can you post the technical name of that field?

Max

12 REPLIES 12

Former Member
0 Kudos

Hi

Can you post the technical name of that field?

Max

0 Kudos

It's BSEG-EGMLD.

0 Kudos

I believe you can try to transfer it  by an user-exit (EXIT_SAPLIEDI_101 or EXIT_SAPLIEDI_111)

Max

0 Kudos

these Exits have following parameters:

I have tried almost all possible fields in that but not getting the desired result.

call customer-function '101'
              exporting  idoc_contrl_index   = idoc_contrl_index
                         idoc_data_index     = idoc_data_index
                         document_line       = akt_belegzeile
              importing  i_fimsg             = user_msg
                 tables  idoc_contrl         = idoc_contrl
                         idoc_data           = idoc_data
                         document_data       = beleg_daten
                         tax_data            = steuer_daten
                         additional_data     = zusatz_daten

0 Kudos

call customer-function '101'

              exporting  idoc_contrl_index   = idoc_contrl_index

                         idoc_data_index     = idoc_data_index

                         document_line       = akt_belegzeile

              importing  i_fimsg             = user_msg

                 tables  idoc_contrl         = idoc_contrl

                         idoc_data           = idoc_data

                         document_data       = beleg_daten

                         tax_data            = steuer_daten

                         additional_data     = zusatz_daten



I've never used it, but I believe this IDOC post the document by BI, so it need to transfer the additional fields in BI format (like table BDCDATA):


The structure of DOCUMENT_DATA is structurated like FTPOST1:



STYPESTYPE_PI
COUNTNUM06
FNAMBDC_FNAM
FVALBDC_FVAL
FVAL_PBDC_FVAL_P


As you can see, here it can move the field and the value


Max

0 Kudos

I tried BSEG-EGMLD with desired value but didnt get the expected result. I believe It should work but not sure what mistake am I doing.

0 Kudos

how have you filled document_data?

Max

0 Kudos
STYPESTYPE_PI = P
COUNTNUM06      = 0002
FNAMBDC_FNAM = BSEG-EGMLD
FVALBDC_FVAL = 'BE'
FVAL_PBDC_FVAL_P = BLANK

Also I tried RF05L-EGMLD as RF05L is the work area for desired SAP screen.

Both Didn't work.

0 Kudos

The idoc should be called the fm  POSTING_INTERFACE_DOCUMENT in order to create a BI session, try to set a break-point here and check if there's your field (T_FTPOST)

Max

0 Kudos

Thanks Max !

It worked for me. Appreciate your help.

0 Kudos

This is exactly the same requirement as I have. Just with INVOIC02 instead of INVOIC01

Shyam - how did you solve the requirement of getting reporting country in the document when posting via IDOC?

0 Kudos

Hi Rene,

I got the results by adding one more record in beleg_daten internal table in below exit .

(EXIT_SAPLIEDI_101)

call customer-function '101'

              exporting  idoc_contrl_index   = idoc_contrl_index

                         idoc_data_index     = idoc_data_index

                         document_line       = akt_belegzeile

              importing  i_fimsg             = user_msg

                 tables  idoc_contrl         = idoc_contrl

                         idoc_data           = idoc_data

                         document_data       = beleg_daten

                         tax_data            = steuer_daten

                         additional_data     = zusatz_daten

Record Added :

STYPESTYPE_PI = P
COUNTNUM06      = 0002
FNAMBDC_FNAM = BSEG-EGMLD
FVALBDC_FVAL = 'BE'
FVAL_PBDC_FVAL_P = BLANK

Hope that will help you , you can modify the data as per your requirement .

Regards,

Shyam Sunder