on 05-06-2014 1:46 PM
Hello Gurus,
I need some help on the following:
When I create a Sales document manually (tcode VA01), CFOP code is determined correctly. But when I try to do the same process, using BAPI BAPI_SALESORDER_CREATEFROMDAT2, with same data ( Sold-To Party and Ship-To Party, material code...), CFOP code is determined wrong.
The SD consultant already checked the configuration in SPRO and everything looks fine.
I went thru debug and found that the FM SD_PARTNER_DATA_GET is called for both process, but internal table GVT_LOCAL_MEMORY is NOT filled when running BAPI and it IS filled when running VA01 (this internal table has VBPA - Partners - data).
This causes a NO_OBJECT_FOUND exception, which makes the program to read the address data from KNA1 (FM J_1B_SD_ADDRESS_READ), with the wrong address number, instead the address form Sales Order, since it's an On Time Customer - WE.
The weirdest thing is that it was working perfectly 3 days ago. We first noticed the problem in QAS environment, but in DEV Sandbox the error is the same now.
The scenario is an Interstate Sales Order. We are about 30 days from Go-Live and now this came thru.
Thanks in advance!
Hello Thiago,
I'm facing the same issue, did you found a solution for that?
SD_SALES_DOCUMENT_INIT is also not working for me...
The CFOP is not updated.
Best Regards,
Moez.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moez.
Functional Team opened a ticket at SAP and we surprisingly got back from them saying that BAPI - BAPI_SALESORDER_CREATEFROMDAT2 doesn't work properly with On Time Customer, having to develop a Z solution by my own.
So I had to re-determinate CFOP in form userexit_move_field_to_vbap, calling FM J_1B_NF_CFOP_2_DETERMINATION and passing all the fields that I need.
That was the only way I could bypass this problem.
Hope could be helpful.
Hi Thiago,
I succeeded to let it work even without SD_SALES_DOCUMENT_INIT.
You have two tables used by BAPI_SALESORDER_CREATEFROMDAT2 order_items_in and order_items_inx
Field cfop_long in all order_items_in lines and in all order_items_inx should be empty
Don't forget the BAPI_TRANSACTION_COMMIT after the BAPI_SALESORDER_CREATEFROMDAT2
Tell me if it's not working for you ...
Moez.
The weirdest thing is that it was working perfectly 3 days ago. We first noticed the problem in QAS environment, but in DEV Sandbox the error is the same now.
Can you also whether the corresponding programs/master data (like material master/customer master) has been changed in between?
If nothing changed, then can you check OSS 1487132 - Message VP 700 (Address category does not exist) during sales order creation with an SD B...
is of any help.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.