cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while setting GR indicator in PO change BADI

Former Member
0 Kudos

Hello Experts,

I am working on SRM 7.0 extended classic .

There is a scnario where in the PO is created using created shopping cart number via report BBP_SC_TRANSFER_GROUPED during this report execution the implementation for BBP_PO_CHANGE method of the BBP_DOC_CHANGE_BADI BADI is getting executed.

( In the BBP_PO_CHANGE method I am setting good reciept indicator field ( GR_IND )at item level based on some conditions .

I have written the below code

data: it_item1 type table of BBP_PDS_PO_ITEM_D,
          ls_item_i TYPE bbp_pds_po_item_icu,
          ls_item TYPE bbp_po_item_badi.
    data  v_indicator type ZNONGR_INDICATOR.

    if IT_ITEM is not INITIAL.
*      refresh et_item.
      loop at IT_ITEM into ls_item_i.
        clear: v_indicator,
               ls_item.

        select SINGLE NON_GRINDICATOR
               from ZNON_GRINDICATOR
               into v_indicator where PRODUCT_CATEGORY eq ls_item_i-CATEGORY_ID.
        if sy-subrc eq 0.
          if v_indicator is not INITIAL.
            clear ls_item_i-GR_IND.
          else.
            ls_item_i-GR_IND = 'X'.
          endif.

          MOVE-CORRESPONDING ls_item_i TO ls_item.
          APPEND ls_item TO et_item.
          CLEAR ls_item_i.
        endif.
      endloop.
    endif.

).

I am getting out put error as 'Please clear the price or set the "Invoice expected" indicator' .

If I comment the part of the code below

if v_indicator is not INITIAL.
            clear ls_item_i-GR_IND.
          else.
            ls_item_i-GR_IND = 'X'.
endif.

This error is not comming. Please suggest where I went wrong.

Thanks & Regards,

Murthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It means PO is getting created with Price >0 with no "invoice indicator" after your code execution. Please review your code. System is giving standard error that either your price should be zero if you don't want "invoice indicator" or check "invoice indicator".

Hope it helps.

Former Member
0 Kudos

In the Move-corresponding statement the invoice indicator field is getting mapped properly, for the cases where the price is equal to zero too the same error is coming up.

Can I have some more inputs please.

Regards,

Murthy

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you