Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Badi ME_PROCESS_PO_CUST of ME21N

Former Member
0 Kudos

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

6 REPLIES 6

madhu_vadlamani
Active Contributor
0 Kudos

Hi Suresh,

Is there any issue to fill that field while creating vendor.

Regards,

Madhu.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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