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: 

WRF1 updates

Former Member
0 Kudos

Hi,

I need to update 'POS outbound profile' field (WRF1- KOPRO) for a store using a FM or a BAPI.

Do you know which one I can use in order to update a site?

Can you please help??

Thanks,

Br

Edited by: yukimai Maio on Nov 30, 2010 12:29 PM

1 REPLY 1

Former Member
0 Kudos

Hi Friends,

When i searched for the same question i ended up with below approach.

Wanted to share/post the answer as it will help others who are searching for the same question.

Answer:

Use Function Module: LOCATION_UPDATE to update field KOPRO in table WRF1.

Example:

  

   CALL FUNCTION 'WRF_READSITEDATA'
    EXPORTING
      i_werks     = '1234' "Give Site number
    IMPORTING
      xs_sit_data = s_site_data.

  IF s_site_data IS NOT INITIAL.
    s_wrf_sit_swrf1_old = s_site_data-wrf_sit_swrf1.
    s_wrf_sit_swrf1_new = s_wrf_sit_swrf1_old.
    s_wrf_sit_swrf1_new-kopro = 'ABCD'.

    CALL FUNCTION 'LOCATION_UPDATE'
      EXPORTING
        i_wrf1  = s_wrf_sit_swrf1_new
        i_ywrf1 = s_wrf_sit_swrf1_old.
    IF sy-subrc EQ 0.
      WRITE: 'Field KOPRO Updated successfully'.
    ENDIF.
  ENDIF.

Thanks,

Padmashree.TR