Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

infopackage: routine to select values from DSO

Hi experts

I need to filter the value for document number FC_OPBEL in an infopackage.

The source for the relevant document numbers is a DSO ZFC_DS85.

The following routine doesn't extract the relevant document numbers from source system ERP although they already exist there.

What's wrong on this routine?

Thanks!

Former Member
Former Member replied

Hi experts

Problem solved! Thanks

DATA: l_idx like sy-tabix.

READ TABLE l_t_range with key     fieldname = 'OPBEL'.

TYPES: BEGIN OF ds85,   

                     FC_OPBEL TYPE /BI0/OIFC_OPBEL,   

              END OF ds85.

DATA: wa TYPE ds85.

DATA: it_beleg TYPE TABLE OF ds85.

SELECT FC_OPBEL

        FROM /bic/azfc_ds8500 

        INTO TABLE it_beleg.

DELETE ADJACENT DUPLICATES FROM it_beleg.

SORT it_beleg BY FC_OPBEL.

IF it_beleg IS NOT INITIAL.

LOOP AT it_beleg INTO wa. 

     l_t_range-low = wa-FC_OPBEL.

     l_idx = sy-tabix. 

       IF l_idx = 1.  

             modify l_t_range index l_idx.

          ELSE.   

          APPEND l_t_range TO l_t_range. 

     ENDIF. 

CLEAR wa.

ENDLOOP.

ENDIF.

p_subrc = 0.

2 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question