cancel
Showing results for 
Search instead for 
Did you mean: 

BADI SD_COND_SAVE_A Not Saving Data

former_member294408
Participant
0 Kudos

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,

Accepted Solutions (0)

Answers (0)