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: 

Modify Schedule Date for a Nomination

Former Member
0 Kudos

I tried both the Function Modules 'OIJ_NOM_MAINTAIN' & 'OIJ_MAINTAIN_NOMINATION'. But it is throwing a Dump.

Can anyone please help & let me know which is the actual Function Module to modify the nomination.

The input value is NOMTK (Nomination Key) and need to modify IDATE field value.

Thanks & Regards,

Sowmya

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try FM OIJ_NOM_MAINTAIN_MULTIPLE. For details refer link.

http://www.se80.co.uk/sapfms/o/oij_/oij_nom_maintain_multiple.htm

Or the FM RFC_TSW_NOM_CHANGEFROMDATA

http://www.se80.co.uk/sapfms/r/rfc_/rfc_tsw_nom_changefromdata.htm

former_member219399
Active Participant
0 Kudos

Hi,

What is the requirement?

If you want to change a nomoinaiton you can use RFC_TSW_NOM_CHANGEFROMDATA.

If you want to chage the date during creation or nomination use badi OIJ_NOM_MAINTAIN.

With regards,

Vamsi

Former Member
0 Kudos

It worked using FM

RFC_TSW_NOM_CHANGEFROMDATA

Thanks!

Providing update indicator 'U' is important. And marking 'X' in the Checkbox as shown below:

l_t_headerdata-nominationnumber_ext = g_nomnr.  "Nomination number
        l_t_headerdata-nominationnumber_sap = g_nomtk.  "Nomination technical Key
        l_t_headerdatax-nominationnumber_sap = g_nomtk.  "Nomination technical Key
        l_t_headerdatax-updkz = 'U'.  "Update indicator = 'U' indicates change
        LOOP AT l_t_oijnomi INTO l_wa_oijnomi.
          l_wa_itemx-nominationnumber_sap  = g_nomtk.
          l_wa_itemx-updkz = 'U'.     "Update indicator = 'U' indicates change
          l_wa_itemx-itemnumber  = l_wa_oijnomi-nomit.
          l_wa_itemx-scheduleddate = 'X'.
          APPEND l_wa_itemx TO l_t_itemx.
          CLEAR l_wa_itemx.
          l_wa_nomi-nominationnumber_sap = l_wa_oijnomi-nomtk.
          l_wa_nomi-itemnumber  = l_wa_oijnomi-nomit.
          l_wa_nomi-scheduleddate = l_wa_oijnomi-idate.
          l_wa_nomi-itemtype = l_wa_oijnomi-sityp.
          APPEND l_wa_nomi TO l_t_nomi.
          CLEAR l_wa_nomi.
        ENDLOOP.

  CALL FUNCTION 'RFC_TSW_NOM_CHANGEFROMDATA'
            EXPORTING
              headerdata_in      = l_t_headerdata
              headerdata_inx     = l_t_headerdatax
            TABLES
              nominationitem_in  = l_t_nomi
              nominationitem_inx = l_t_itemx
              return             = l_t_return.
          IF sy-subrc EQ 0.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
          ENDIF.

Thanks & Regards,

Sowmya