‎2010 Jul 19 1:40 AM
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!
‎2010 Jul 21 6:41 PM
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...
‎2010 Jul 21 7:20 PM
Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked Rob