cancel
Showing results for 
Search instead for 
Did you mean: 

how to add standard fields in powl?

dream_woo2
Explorer
0 Kudos

Hi, Experts

I am  working in SRM7.01 now.

I have append

CATEGORY_ID

PRICE

QUANTITY

in the structure:

/SAPSRM/S_POWL_RESULT_PO_ITEM

The 3 fields appeared in the PO powl. The value of QUANTITY is displayed in the powl.

But the value of CATEGORY_ID and PRICE does not displayed.

Any advice on how to display the value of the 2 fields?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please try implementing Badi /SAPSRM/BD_POWL_CHNG_SEL_RSLT and populate the columns in method /SAPSRM/IF_EX_BD_POWL_SEL_RSL~CHANGE_SELECT_RESULT

dream_woo2
Explorer
0 Kudos

Hi Sushil,

Thanks for your reply.

But,could you give me some more details of how to impement the badi ?

Former Member
0 Kudos

when you implement the badi method, table CT_RESULT contains the search result.

You have to loop through it and populate the field values for the 2 fields you added for each po record in the table.

dream_woo2
Explorer
0 Kudos

hi Sushil,

I have tried to loop at  table CT_RESULT, and use the FM BBP_PD_PO_GETDETAIL to get the value of the two fields.

But when I write the abap code , it cannot be compiled....the error is :

"CT_RESULT" has a generic type. Use of this type is only possible for  typing field symbols and formal parameters 

any idea of how to access the table CT_RESULT?

I write the code as follows:

   METHOD /SAPSRM/IF_EX_BD_POWL_SEL_RSL~CHANGE_SELECT_RESULT.

  FIELD-SYMBOLS: <LFS_RESULT> LIKE LINE OF CT_RESULT.
  DATA: LTD_ITEM TYPE TABLE OF BBP_PDS_PO_ITEM_D.

  LOOP AT CT_RESULT ASSIGNING <LFS_RESULT>.

    CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
      EXPORTING
*       I_GUID                           =
        I_OBJECT_ID                      = <LFS_RESULT>-OBJECT_ID
*       I_ATTACH_WITH_DOC                = ' '
*       I_WITH_ITEMDATA                  = 'X'
*       I_READ_BE_DATA                   = ' '
*       I_ITEM_SORTED_BY_HIERARCHY       =
*       I_WITHOUT_HEADER_TOTALS          = 'X'
*       I_READ_TEXT_FLAGS                =
*       I_READ_FROM_ARCHIVE              = ' '

dream_woo2
Explorer
0 Kudos

finally, i found the way to loop the table CT_RESULT. thank you for your advice!!

Former Member
0 Kudos

Hi Dream,

do you remember how you did the looping on the INDEX table.

Former Member
0 Kudos

The key is to define the proper type for the field symbol and then let the ASSIGING do the casting.

FIELD-SYMBOLS: <fs_result>  TYPE LINE OF /SAPSRM/S_POWL_RESULT_PO_ITEM.


LOOP AT CT_RESULT ASSIGNING <FS_RESULT>.


regards

José


Former Member
0 Kudos

Thanks... Jose.

It took me a while to figure out the structure. I went on the Where USED list path to find the reference structure.

Answers (0)