on 05-17-2017 4:49 AM
hi Experts,
I wrote a cross ET badi to copy payment term field value from company code to , other cc and all purchasing orgs.
The badi is working for copying payment terms from company code to purchasing org , but when I write data in exact same way for writing zterm in Bp_compny , if more than 1 cc exist for that vendor, it is not working . Only updates po but not other cc,
Please provide of any hints.
Hi all,
thank you for your inputs.
I was able to solve the issue:
While writing PO, payment terms, usmd_fag was automatically set to abap_true
however while Company code, flag was set to true only for the CC i am changing , after i set the flag for all CC in the loop. it is working.
Also, they key filled up for both CC and PO is just the BP_header (BP#)
Thank You again. Shaila.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shaila,
Since the BP_CUS_CC will be common for all the company codes, please use the Single Entity badi. In the CT_DATA you will get all the company code for the given BP. In this badi, you can copy the vaues between the Company codes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It would be great if you can add some more details..what you mean by 'write data in exact same way for writing zterm in Bp_compny'.
Thank youYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the post.
I used the below write_data method to write the data back to the UI for both Company code data and purchasing organization data. However this statement does not work for CC data, and works only for PO data to update payment terms. the condition is user should be updating CC , payment terms for one of the main CC and at this time - Payment terms should be copied to all CC and PO of that vendor.
i_entity = 'BP_PORG' " Or BP_COMPNY
it_key = lt_key "has BP # from header data
it_attribute = lt_attribute "ZTERM_M or ZTERM
it_data = "internal table with all PO or CC for that vendor , 1 or more entries
TRY.
io_write_data->write_data(
EXPORTING
i_entity
it_key
it_attribute
it_data ).
CATCH cx_usmd_write_error.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.