cancel
Showing results for 
Search instead for 
Did you mean: 

SRM - GR IR GRIV Indicators in BADI - BBP_DOC_CHANGE_BADI

former_member210252
Contributor
0 Kudos

Hi,

I am using BBP_DOC_CHANGE_BADI and the method BBP_PO_CHANGE in which changing the values.

Code is as below

DATA: it_value TYPE TABLE OF zts_related_docs,
           wa_value TYPE zts_related_docs.
   DATA: it_orderadm_h TYPE TABLE OF crmd_orderadm_h,
         wa_orderadm_h TYPE crmd_orderadm_h.

   DATA: wa_item TYPE bbp_pds_po_item_icu,
         ls_icf TYPE bbp_pds_icf_po.

   DATAwa_it_icf TYPE bbp_pds_icf_po,
          wa_it_acc TYPE bbp_pds_acc,
          wa_it_part TYPE bbp_pds_partner,
          wa_it_org TYPE bbp_pds_org,
          wa_it_hcf TYPE bbp_pds_hcf_po,
          wa_it_sdln TYPE bbp_pds_sdln,
          wa_it_tol TYPE bbp_pds_tol.


   DATA: wa_et_item    TYPE bbp_po_item_badi,
         wa_et_acc     TYPE bbps_acc_badi,
         wa_et_part    TYPE bbp_pds_partner,
         wa_et_org     TYPE bbp_pds_org,
         wa_et_hcf     TYPE bbp_pds_hcf_po,
         wa_et_icf     TYPE bbp_pds_icf_po,
         wa_et_sdln    TYPE bbp_pds_sdln,
         wa_et_tol     TYPE bbp_pds_tol.

   CLEAR wa_value.

   IF flt_val EQ 'BUS2201'.

*** For Testing Purpose set all values to NULL
     wa_value-zzgr_ind = ''.
     wa_value-zzir_ind = ''.
     wa_value-zzgr_basediv = ''.

*    IF wa_value IS NOT INITIAL.
     MOVE-CORRESPONDING is_header TO es_header.
     es_header-gr_ind = wa_value-zzgr_ind.
     es_header-ir_ind = wa_value-zzir_ind.
     es_header-gr_basediv = wa_value-zzgr_basediv.


*    ENDIF.

     LOOP AT it_item INTO wa_item.
       MOVE-CORRESPONDING wa_item TO wa_et_item.
       wa_et_item-gr_ind = wa_value-zzgr_ind.
       wa_et_item-ir_ind = wa_value-zzir_ind.
       wa_et_item-gr_basediv = wa_value-zzgr_basediv.
       APPEND wa_et_item TO et_item.
       CLEAR: wa_et_item,wa_item.
     ENDLOOP.
CLEAR wa_value.

     LOOP AT it_acc INTO wa_it_acc.
       MOVE-CORRESPONDING wa_it_acc TO wa_et_acc.
       APPEND wa_et_acc TO et_acc.
       CLEAR: wa_it_acc,wa_et_acc.
     ENDLOOP.

     LOOP AT it_partner INTO wa_it_part.
       MOVE-CORRESPONDING wa_it_part TO wa_et_part.
       APPEND wa_et_part TO et_partner.
       CLEAR: wa_it_part,wa_et_part.
     ENDLOOP.

     LOOP AT it_icf INTO wa_it_icf.
       MOVE-CORRESPONDING wa_it_icf TO wa_et_icf.
       APPEND wa_et_icf TO et_icf.
       CLEAR: wa_it_icf,wa_et_icf.
     ENDLOOP.

     LOOP AT it_hcf INTO wa_it_hcf.
       MOVE-CORRESPONDING wa_it_hcf TO wa_et_hcf.
       APPEND wa_et_hcf TO et_hcf.
       CLEAR: wa_it_hcf,wa_et_hcf.
     ENDLOOP.

     LOOP AT it_orgdata INTO wa_it_org.
       MOVE-CORRESPONDING wa_it_org TO wa_et_org.
       APPEND wa_et_org TO et_orgdata.
       CLEAR: wa_it_org,wa_et_org.
     ENDLOOP.

     LOOP AT it_sdln INTO wa_it_sdln.
       MOVE-CORRESPONDING wa_it_sdln TO wa_et_sdln.
       APPEND wa_et_sdln TO et_sdln.
       CLEAR: wa_it_sdln,wa_et_sdln.
     ENDLOOP.

     LOOP AT it_tol INTO wa_it_tol.
       MOVE-CORRESPONDING wa_it_tol TO wa_et_tol.
       APPEND wa_et_tol TO et_tol.
       CLEAR: wa_it_tol, wa_et_tol.
     ENDLOOP.
   ENDIF.

The  problem is the values of  es_header-gr_ind, es_header-ir_ind,es_header-gr_basediv should set to NULL after executing the BADI for a PO opened from the Portal.

In Portal->Procurement->Puchasing->Open a PO->Items->Related Documents we will see the Indicators. Screen shot attached. For the three indicators as per the above code the values should assing to null i.e three related indicator check boxes should be Un Checked.

Two indicators are unchecked but gr_basediv is always checked.

Any ideas please share.

Regards,

Mohammed


Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Mohammed,

please, have a look at wiki below:

Standard behavior to GR_BASEDIV flag

Regards.

Laurent.

former_member210252
Contributor
0 Kudos

Hi ,,

Thank you a lot for the link provided for GR_BASEDIV flag.

Regards,

Mohammed

former_member210252
Contributor
0 Kudos

Hi Laurent,

Thanks a lot for the valuable information.

I came to know clearly about the flags now.

Regards,

Mohammed

former_member210252
Contributor
0 Kudos

Hi Laurent,

Thanks a lot for the valuable information.

I came to know clearly about the flags now.

Regards,

Mohammed

former_member210252
Contributor
0 Kudos

Hi Laurent,

Can you please help me on this http://scn.sap.com/thread/3390114

Regards,

Mohammed

Answers (1)

Answers (1)

former_member208244
Active Participant
0 Kudos

Hello Rafi,

It is checked because your supplier has it checked in the Supplier database (check purchasing view in MK03 or BP if you use BPs). It is standard behaviour, you cannot un-check it.

Regards

SG