‎2013 Apr 30 11:01 AM
Hello Experts,
I am doing this for the first time so i need ur help,
I have a requirement regarding transaction FB70 as follows :
The user will upload an excel sheet in the below format:
| sr No. | Customer | Document Date | Reference | Amount | currency | Text | G/L Account | Internal Order | Assignment | HeaderText | Ref.key 1 | Ref.key 2 | Ref.key 3 |
| 1 | 100021 | 28.04.2013 | Jay | 50 | INR | a | 7000400 | R1000003 | 1 | z | as | qw | rt |
There are two radio buttons on the screen specifying whether to PARK or POST the document.
I have completed the conversion part of converting the excel file into SAP format and stored it in Internal Table - it_data.
It is a customer invoice for incoming payments,
Posting can be done using the bapi
I have researched and understood that i need to use the structures of BAPI_ACC_DOCUMENT_POST:
HOW TO PARK the document in FB70?
Is there any BAPI for that
My doubt is that both structures contain many common fields; so I'm confused about which fields to use from which structure !!
and which field corresponds to the FB70 fields mentioned above .
‎2013 Apr 30 12:40 PM
Hi Jay,
If you test run BAPI_ACC_DOCUMENT_POST, you would realize that out of those many fields, for actual document posting only some mandatory fields are required. Using those you can do the document posting.
Secondly, for parking you can use the same BAPI with a slight modification. You can enhance the BAPI to handle the parking case. You can use the 'EXTENSION1' table and pass the variable for PARKING the document.
Please find for your reference:
http://scn.sap.com/message/3475534
But I would suggest to go with BDC in this case as I had faced a log of issue doing this with BAPIs(esp when tax comes into picture).
Revert in case you need to discuss.
Regards,
Deepak.
Regards,
Deepak.
‎2013 Apr 30 12:40 PM
Hi Jay,
If you test run BAPI_ACC_DOCUMENT_POST, you would realize that out of those many fields, for actual document posting only some mandatory fields are required. Using those you can do the document posting.
Secondly, for parking you can use the same BAPI with a slight modification. You can enhance the BAPI to handle the parking case. You can use the 'EXTENSION1' table and pass the variable for PARKING the document.
Please find for your reference:
http://scn.sap.com/message/3475534
But I would suggest to go with BDC in this case as I had faced a log of issue doing this with BAPIs(esp when tax comes into picture).
Revert in case you need to discuss.
Regards,
Deepak.
Regards,
Deepak.
‎2013 Apr 30 12:52 PM
thanks for a prompt response
Tax is not an issue so im using BAPI .
And as mentioned i need only the above mentioned 13 fields of FB70..
Is there any way to find out that which field of the structures correspond to the 13 fields needed ??..
‎2013 Apr 30 2:11 PM
Hi Jay,
no. If you analyze the code, (global search for 'MAP' in function group ACC9) you can find Form fill_accit_from_bapi_accit. It may have most of what you need:
i.e.
gs_accit-posnr = gs_bapi_accit-itemno_acc .
gs_accit-bukrs = gs_bapi_accit-comp_code .
gs_accit-hkont = gs_bapi_accit-gl_account .
gs_accit-budat = gs_bapi_accit-pstng_date .
gs_accit-bldat = gs_bapi_accit-doc_date .
gs_accit-wwert = gs_bapi_accit-trans_date .
gs_accit-valut = gs_bapi_accit-value_date .
gs_accit-logvo = gs_bapi_accit-log_proc .
gs_accit-kstat = gs_bapi_accit-stat_con
gs_accit-gjahr = gs_bapi_accit-fisc_year .
gs_accit-monat = gs_bapi_accit-fis_period .
* gs_accit-ABPER = gs_bapi_accit-STLMNT_PER .
gs_accit-blart = gs_bapi_accit-doc_type .
gs_accit-xref1 = gs_bapi_accit-ref_key_1 .
gs_accit-xref2 = gs_bapi_accit-ref_key_2 .
gs_accit-xref3 = gs_bapi_accit-ref_key_3 .
gs_accit-ktosl = gs_bapi_accit-acct_key .
gs_accit-koart = gs_bapi_accit-acct_type .
gs_accit-kunnr = gs_bapi_accit-customer .
gs_accit-lifnr = gs_bapi_accit-vendor_no .
gs_accit-sgtxt = gs_bapi_accit-item_text .
gs_accit-gsber = gs_bapi_accit-bus_area .
gs_accit-kostl = gs_bapi_accit-costcenter .
gs_accit-lstar = gs_bapi_accit-acttype .
gs_accit-bpmng = gs_bapi_accit-po_pr_qnt .
gs_accit-bprme = gs_bapi_accit-po_pr_uom .
gs_accit-aufnr = gs_bapi_accit-orderid .
gs_accit-anln1 = gs_bapi_accit-asset_no .
gs_accit-anln2 = gs_bapi_accit-sub_number .
gs_accit-bzdat = gs_bapi_accit-asval_date .
gs_accit-matnr = gs_bapi_accit-material .
gs_accit-menge = gs_bapi_accit-quantity .
gs_accit-meins = gs_bapi_accit-base_uom .
gs_accit-werks = gs_bapi_accit-plant .
gs_accit-pargb = gs_bapi_accit-tr_part_ba .
gs_accit-hrkft = gs_bapi_accit-orig_group .
gs_accit-hkmat = gs_bapi_accit-orig_mat .
gs_accit-kstrg = gs_bapi_accit-costobject. "Note769308
gs_accit-prctr = gs_bapi_accit-profit_ctr .
gs_accit-pprctr = gs_bapi_accit-part_prctr .
You have also some special conversions, look at the form routine. There may be even more conversions - global search helps!
Regards
Clemens