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: 

/KYK/F110_UPD_PROPOSAL reject an item

0 Kudos

Dear experts,

I have a question regarding the FM /KYK/F110_UPD_PROPOSAL

I'm using this FM to update a payement proposal. The problem is that after updating the proposal I don't get the same treatement as doing it manually,

the rejected item completely disappears.

The FM requires some inputs, I'm not sure of what I'm giving to it as Input. So here 'is my code

 select * from REGUH into CORRESPONDING FIELDS OF TABLE it_reguh  where laufd = LAUFD

                                               and   laufi = LAUFI

                                               and   xvorl = 'X'

                                               and   lifnr = LIFNR.

  if sy-subrc = 0.

    move it_reguh to it_newreguh.

    move it_reguh to it_oldreguh.

  endif.



  loop at it_belnr into wa_belnr.



    select  single * into CORRESPONDING FIELDS OF wa_regup from regup

                where laufd = LAUFD

                and   laufi = LAUFI

                and   xvorl = 'X'



                and   lifnr = LIFNR



                and   belnr = wa_belnr-BELNR.

    if sy-subrc = 0.

      append wa_regup to IT_OLDREGUP.

      wa_regup-ZLSPR = 'A'.

      wa_regup-vblnr = space.

      append wa_regup to IT_NEWREGUP.

    endif.

  endloop.



  CALL FUNCTION '/KYK/F110_UPD_PROPOSAL'

    EXPORTING

      I_KEY_LAUFD = LAUFD

      I_KEY_LAUFI = LAUFI

      I_NEWREGUH  = IT_NEWREGUH

      I_NEWREGUP  = IT_NEWREGUP

      I_OLDREGUH  = IT_OLDREGUH

      I_OLDREGUP  = IT_OLDREGUP.



  if sy-subrc = 0.

    commit work and wait.

  endif.

Please advise me .

Regards,

Houriya

FIN (Finance)

0 REPLIES 0