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: 

I have requirement in VISTEX memberships to update custom fields in /IRM/GMLMBR table

Former Member
0 Kudos

I have requirement in VISTEX memberships to update custom fields in /IRM/GMLMBR table.

There are two options on my research

1) Using Function module /IRM/GML_CHANGE which is not working to update the custom z fields added.

2) SHDB BDC Recording the /IRM/GMLM transaction and updating the fields from the excel which is also not working as I has the ALV to enter memberships fields.

Please suggest any alternative or let me know any solution from above two solutions.

2 REPLIES 2

former_member182877
Participant
0 Kudos

Hi Pabba,

Were you able to resolve your issue? If yes - How did you achieve it?

Cheers,

Kripa Rangachari.

0 Kudos

Yes it has been resolved. I found one function module to update a custom field. But please test we found that few A tables are getting updated when you are trying to change using this function module.

********************************************************************************************************************

DATA: gt_msnum_ch TYPE /irm/t_gmlmsnum,

         gw_msnum_ch TYPE /irm/s_gmlmsnum,

         gt_mldoc TYPE /irm/t_gml_doc,

         gw_mldoc TYPE /irm/s_gml_doc.

   DATA: gw_mldo_ch TYPE /irm/s_gmlmbr,

         gt_mldo_ch TYPE /irm/t_gmlmbr.

   DATA: gw_mlhdr_ch TYPE /irm/s_gmlhdr.

   gw_msnum_ch-msnum = gx_gmlmhdr-msnum.

   APPEND gw_msnum_ch TO gt_msnum_ch.

   CALL FUNCTION '/IRM/GML_VIEW'

     EXPORTING

       it_msnum       = gt_msnum_ch

     IMPORTING

       et_mldoc       = gt_mldoc

     EXCEPTIONS

       no_data_exists = 1

       OTHERS         = 2.

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

   LOOP AT gt_mldoc INTO gw_mldoc .

     gt_mldo_ch = gw_mldoc-x-mlmbr.

     LOOP AT gt_mldo_ch INTO gw_mldo_ch.

*& CHANGE GPO FORMAT TO GPO-001

       CHECK gw_mldo_ch-zgponm IS INITIAL.

       IF gx_gmlmhdr-trorg+0(1) = gc_g

         AND gx_gmlmhdr-trorg+1(1) CO gc_num_ch

         AND gx_gmlmhdr-trorg+2(1) CO gc_num_ch.

         gv_trorg = gx_gmlmhdr-trorg+1(2).

         CONCATENATE text-023 gv_trorg INTO gw_mldo_ch-zgponm.

       ELSEIF gx_gmlmhdr-trorg+0(4) = text-029

         AND gx_gmlmhdr-trorg+4(1) CO gc_num_ch

         AND gx_gmlmhdr-trorg+5(1) CO gc_num_ch

         AND gx_gmlmhdr-trorg+6(1) CO gc_num_ch.

         gw_mldo_ch-zgponm = gx_gmlmhdr-trorg.

       ELSEIF gx_gmlmhdr-trorg+0(3) = text-023 OR

              gx_gmlmhdr-trorg+0(3) = text-024 OR

              gx_gmlmhdr-trorg+0(3) = text-025 OR

              gx_gmlmhdr-trorg+0(3) = text-026 OR

              gx_gmlmhdr-trorg+0(3) = text-027.

         CONCATENATE text-022 gx_gmlmhdr-trorg+2(1) INTO gw_mldo_ch-zgponm.

       ENDIF.

       gw_mlhdr_ch = gw_mldoc-x-mlhdr.

       gw_mlhdr_ch-msref = text-030.

       gw_mlhdr_ch-aenam = sy-uname.

       gw_mlhdr_ch-aedat = sy-datum.

       gw_mldoc-x-mlhdr = gw_mlhdr_ch.

       gw_mldo_ch-updkz = gc_u.

       MODIFY gt_mldo_ch FROM gw_mldo_ch.

       gw_mldoc-updkz = gc_x.

       gw_mldoc-x-mlmbr = gt_mldo_ch.

       MODIFY gt_mldoc FROM gw_mldoc.

       CLEAR gx_alv.

       gx_alv-msg_typ = gc_s.

       gx_alv-kunnr = gw_mldo_ch-kunnr.

       gx_alv-msnum = gx_gmlmhdr-msnum.

       gx_alv-trorg = gx_gmlmhdr-trorg.

       gx_alv-lv_msg = text-018.

       APPEND gx_alv TO gt_alv.

     ENDLOOP.

     gv_count_n_rel = gv_count_n_rel + 1.

   ENDLOOP.

   CALL FUNCTION '/IRM/GML_SAVE'

     EXPORTING

       i_set_update_task = 'X'

       i_commit_work     = 'X'

     TABLES

       t_mldoc           = gt_mldoc

     EXCEPTIONS

       no_change         = 1

       OTHERS            = 2.

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

****************************************************************************************************************