Quantcast
Channel: SCN: Message List - Business Content and Extractors
Viewing all articles
Browse latest Browse all 5631

Re: dataSource enhancement fields are empry on BW

$
0
0

Hi Anshu, thank's a lot.

 

Below the code I m using to fill the fields:

****************************************************************************************************************

 

 

FIELD-SYMBOLS <i_fs_data> like ZBIW_PROJ_ODP.



DATA l_tabix TYPE sy-tabix.



DATAl_value TYPE DD07V-DDTEXT,

       I_DOMNAME TYPE DD07V-DOMNAME,

       I_DOMVALUE type DD07V-DOMVALUE_L.



Data: BEGIN OF SplitStruct,

        Value(10) type C,

      END OF SplitStruct.



Data: SplitTable like table of SplitStruct.



*******Initialisation***********

I_DOMNAME = 'ZZREGIO'.



CASE i_datasource.



  WHEN 'ZPROJECT_ATTR'.

    loop at i_t_data ASSIGNING <i_fs_data>.

      l_tabix = sy-tabix.



********Getting region

        clear I_DOMVALUE.

        select single PROJ~ZZREGION from PROJ into I_DOMVALUE

          where PROJ~PSPID = <i_fs_data>-PSPID.



        if sy-subrc = 0 and I_DOMVALUE IS NOT INITIAL.



          clear l_value.

          I_DOMNAME = 'ZZREGIO'.

          CALL FUNCTION 'DOMAIN_VALUE_GET'

            EXPORTING

              I_DOMNAME  = I_DOMNAME

              I_DOMVALUE = I_DOMVALUE

            IMPORTING

              E_DDTEXT   = l_value

            EXCEPTIONS

              NOT_EXIST  = 1

              OTHERS     = 2.

          if sy-subrc = 0.

            <i_fs_data>-ZZREGION = l_value.

          endif.

        ENDIF.

********Getting project type

        clear I_DOMVALUE.

        select single PROJ~ZZTYPE from PROJ into I_DOMVALUE

          where PROJ~PSPID = <i_fs_data>-PSPID.



        if sy-subrc = 0 and I_DOMVALUE IS NOT INITIAL.



          clear l_value.

          I_DOMNAME = 'ZZTYPE'.

          CALL FUNCTION 'DOMAIN_VALUE_GET'

            EXPORTING

              I_DOMNAME  = I_DOMNAME

              I_DOMVALUE = I_DOMVALUE

            IMPORTING

              E_DDTEXT   = l_value

            EXCEPTIONS

              NOT_EXIST  = 1

              OTHERS     = 2.

          if sy-subrc = 0.

            <i_fs_data>-zztype = l_value.

          endif.

        ENDIF.



********Getting project

        clear I_DOMVALUE.

        select single PROJ~ZZPROG from PROJ into I_DOMVALUE

          where PROJ~PSPID = <i_fs_data>-PSPID.

***********a project may be affected to many programs, so the ZZPROG contains a list of program number, for example:   12,2,14

        if sy-subrc = 0 and I_DOMVALUE IS NOT INITIAL.





        refresh SplitTable.

        I_DOMNAME = 'ZZPROG'.

        split I_DOMVALUE at ',' into table SplitTable.

***********The SplitTable will contain the list of program numbers that the current project is affected to

        loop at SplitTable into SplitStruct-Value.

          l_tabix = sy-tabix.

          clear l_value.

          CALL FUNCTION 'DOMAIN_VALUE_GET'

            EXPORTING

              I_DOMNAME  = I_DOMNAME

              I_DOMVALUE = SplitStruct-Value

            IMPORTING

              E_DDTEXT   = l_value

            EXCEPTIONS

              NOT_EXIST  = 1

              OTHERS     = 2.

          if sy-subrc = 0.

            if l_tabix = 1.

              <i_fs_data>-zzPROG1 = l_value.

            elseif l_tabix = 2.

              <i_fs_data>-zzPROG2 = l_value.

            ELSEIF l_tabix = 3.

              <i_fs_data>-zzPROG3 = l_value.

            else.

              exit.

            endif.



          endif.

        ENDLOOP.



        ENDIF.

*      ENDIF.

    ENDLOOP.

  WHEN OTHERS.

    EXIT.



ENDCASE.

*********************************************************************************************************

 

I thing it works fin, cause in the RSA3 t-code, the fields are filled properly.

 

Thank's for your help.

Abdess,


Viewing all articles
Browse latest Browse all 5631

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>