Skip to Content
0

BADI SD_COND_SAVE_A Not Saving Data

Nov 13, 2016 at 07:50 AM

44

avatar image
Former Member

Dear All ,

I have a problem with BADI " SD_COND_SAVE_A " using it in transaction VK11 , I suppose to use it to make changes in saving data depending on User Parameter , In Break Point the data is already changed in table CT_KONPDB_NEW but in the end it take the data inserted by end user and ignore my code , So can any one give me an advice

" Declerations
DATA: gt_parameters  TYPE ustyp_t_parameters,

      gwa_parameters TYPE ustyp_parameters,

      Pro_State type konp-kopos ,

      wa_konp type KONP .


" Get User Paramter
CALL FUNCTION 'SUSR_USER_PARAMETERS_GET'

  EXPORTING

    user_name           = sy-uname

    with_text           = 'X'

  TABLES

    user_parameters     = gt_parameters

  EXCEPTIONS

    user_name_not_exist = 1

    OTHERS              = 2.
IF sy-subrc eq 0.
  LOOP AT gt_parameters INTO gwa_parameters.
"ZPST Paramter Name 
if gwa_parameters-PARID = 'ZPST' and GWA_PARAMETERS-PARVA NE ''. 

  clear PRO_STATE .

  PRO_STATE = GWA_PARAMETERS-PARVA .

  endif .

ENDLOOP.

if PRO_STATE ne '' .

  loop at CT_KONPDB_NEW into wa_konp .

    WA_KONP-KOPOS = PRO_STATE .
" Update 
modify CT_KONPDB_NEW index sy-tabix from wa_konp  .
    endloop.
 endif.
ENDIF.

Thanks,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers