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

implicit enhancement code request

Former Member
0 Likes
634

I have to add code in implicit enhancement point in standard FM IDOC_INPUT_ACC_DOCUMENT,

writing the code for the first time,request you to help with the piece of code with the following logic:

u2022Check if message function (MESFCT) in IDOC control equals to u201CNSAu201D or u201CSAu201D

u2022Only if the above check is fulfilled, then check if customer number (KUNNR) is exist in specified company code (BUKRS)  check in table KNB1

u2022If customer number is not exist:

oGet company code (COMP_CODE), allocation number (ALLOC_NMBR) and SAP customer prefix (3rd & 4th digit of CUSTOMER) from IDOC segment E1BPACAR09

oValidate if those data are maintained in a new custom table ZAR_CHARGE_MAP as selling company code, selling industry key and selling SAP customer prefix

oIf those data are maintained:

 Get charging company code, charging industry key and charging SAP customer prefix  it is possible to get more than 1 record

ï‚§ For every record,

u2022 Populate a new customer number with charging SAP customer prefix

u2022 Check if that new customer number is exist in charging company code  check table KNB1 again

u2022 If it is exist, update IDOC value in segment below then it is not necessary to check the next record. Be noted that IDOC value in database table (EDID4) must be updated as well and be noted also that some segment below except header segment can be more than 1 segment in 1 IDOC therefore looping is required.

o E1BPACHE09  COMP_CODE

o E1BPACGL09  COMP_CODE, ALLOC_NMBR (same as industry key) and PROFIT_CTR (from custom table ZAR_CONVINVFI)

o E1BPACAR09  CUSTOMER, COMP_CODE, ALLOC_NMBR (same as industry key) and PROFIT_CTR (from custom table ZAR_CONVINVFI)

o E1BPACCR09  CURRENCY (from custom table ZAR_CONVINVFI)

u2022 If it is not exist, then repeat 3 steps above.

Request you all to help with the coding samples,i am doing it for AR invoice interface.

thanks in advance!

2 REPLIES 2
Read only

Former Member
0 Likes
471

Suggest you write it, then post anything for which you are unable to discover a solution from ABAP Help or the SDN Forums. Everybody here has their own code development assignment...

Read only

Former Member
0 Likes
471

Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked Rob