07-23-2011 12:17 PM
Hi all,
Is there any way to export/update ADDR1_DATA( in Delivery Address tab) from the Badi ME_PROCESS_PO_CUST when the user SAVE/POST PO. I have the Delivery Address tab data in the CHECK method of the same BADI, how can I export it to Subscreen of Delivery Address.
If there is no way please suggest me any Exit/Badi to update the Delivery address tab Data as well as EKPO-ADRNR when User click SAVE button in ME21N . Because this data is based on EKPO-ADRNR after some modification.
Thanks Suresh
07-23-2011 4:02 PM
Hi Suresh,
Is there any issue to fill that field while creating vendor.
Regards,
Madhu.
07-23-2011 6:21 PM
Hi Madhu,
I am not sure Madhu. Please explain me this way how can I fill while Vendor creation. I will give a try and let us know.
Thanks,
Suresh
07-24-2011 4:51 AM
Hi Suresh,
Small correction. Actually a new ADRNR will generate when ever a new customer or vendor created. This is the common field to join those tables to get address. Now my question when you click on delivery address you will get all the data from vendor master .Is there any issue here. We can not create ADRNR field manually.That will system generated number. Post if need any clarification.
Regards,
Madhu.
07-24-2011 9:04 AM
Hi Madhu thank you so much for your help.
I hope you can solve my issue, below is my detailed explaination.
I have written the logic to update Delivery Address tab in ME21N in Process_Item() method.
There are two fields(for example Field1 and Field2 as radio buttons) added in Custom sbscreen on ME21N using Screen Exit and CI_EKPODB.
if Field1 = 'X'.
*modify the required item field data you want.
-
*
-
*
item_data-adrnr = new_adrnr.
im_item->set_data( item_data )." updating item data
endif.
if Field2 = 'X'
*modify the required item field data you want.
-
*
-
*
item_data-adrnr = new_adrnr.
im_item->set_data( item_data )." updating item data
endif.
This is working fine and delivery Address tab data also changing and i can see the data for the new ADRNR.
But the issue is again if i change the Field1 and Field2, as these are custom fields Process_item() method is not triggering,
if I Change any stadard item fields then only Process_item() method is triggering.
So i have tried with Check() as well from the check method i am calling Process_item().
This is fine( the adrnr is changing ) but the new adrnr data not able to see in Delivery Address tab,
until i hit the Reset Address button in the Delivery Address tab.
If I can Automate the RESET ADDRESS button functionality, then we can see new ADRNR data in the Delivery Address tab.
I have tried with the FM 'ADDR_EXP_SUBSCREEN' but it seems no use.
please help me Madhu.
Thanks,
Suresh
07-24-2011 12:36 PM
Hi Suresh,
Did you check the function code of that button.Actually why you want to change the address from po.Is it the business requirement.
Regards,
Madhu.
07-24-2011 2:18 PM
Hi Madhu,
yes I have checked that and the following finction I called.
CALL FUNCTION 'MM_DELIVERY_ADDRESS_OKCODE'
EXPORTING
im_okcode = ext_fcode." (MEDLADRESE: delivery address ok_code )
CALL FUNCTION 'ADDR_EXP_SUBSCREEN'
EXPORTING
address_number = addrnumber" (new ADNR)
address_handle = addrhandle
address_group = 'ME02'
dialog_mode = dialog_mode"( DISPLAY)
SUGGESTED_VALUES =
address_is_optional = 'X'
*check_address = ' '
c*ursor_field = i_cursor_field
EXCEPTIONS
address_not_exist = 1
group_not_valid = 2
parameter_error = 3
internal_error = 4
OTHERS = 5.
but I am not sure "address handle" parameter in the FUNCTION 'ADDR_EXP_SUBSCREEN', Please let me know if I am wrong.
Thanks,
Suresh