cancel
Showing results for 
Search instead for 
Did you mean: 

how can i modify the EXIT_SAPLRSAP_003?

Former Member
0 Kudos

Hi,

Glad to meet you all gurus.

I have to work on text data source Enhancements.

I am poor at ABAP. So, I ask you to know how to correct coding.

this is my code. it has no errors, but it can't extract the data OTL.

what's wrong with my codes?

i want to use 0PROJECT_TEXT for the customer object ZPROJ_NO text data.

and ZPROJ_NO's key is the same as PROJ-PSPNR

as you know, 0PROJECT_TEXT's key is PROJ-PSPID.

and as far as i know, PROJ-PSPID has one-to-one correspondence with PROJ-PSPNR.

so, i expand the PSPHI in 0PROJECT_TEXT's structure PSBWPRJTXT.

this below is my coding.

*&---------------------------------------------------------------------*

*&  Include           ZXRSAU03

*&---------------------------------------------------------------------*

data: l_s_icctrcst like icctrcst,

      l_s_icctract like icctract,

      l_s_icctrsta like icctrsta,

      l_tabix      like sy-tabix.

CASE I_CHABASNM.

*----------------------------------------------------------------------*

* 0PROJECT_TEXT    2012.04.25  Created by leah       *

*----------------------------------------------------------------------*

  WHEN '0PROJECT'.

    DATA: ls_FC TYPE PSBWPRJTXT.

    LOOP AT C_T_TEXTS INTO ls_FC .

      l_tabix = sy-tabix.

      SELECT SINGLE PSPNR FROM PROJ INTO ls_FC-PSPHI

      WHERE PSPID =  ls_FC-PSPID.

      MODIFY C_T_TEXTS FROM ls_FC INDEX l_tabix.

    ENDLOOP.

ENDCASE.

Thanks in advance,

Leah.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thx to all.

i solve? the problem.

i don't know why it can be solved by this way.kk

anyway,

i insert the below code in the EXIT_SAPLRSAP_002 - ZXRSAU02

as far as i know text data source enhancement is in the EXIT_SAPLRSAP_003 - ZXRSAU03

but after insert this code in the 2s, the datasource can take the PSPHI data.


  WHEN '0PROJECT_TEXT'.
    DATA: ls_FC2 TYPE PSBWPRJTXT.

    LOOP AT i_t_data INTO ls_FC2 .
      l_tabix = sy-tabix.

      SELECT SINGLE PSPNR FROM PROJ INTO ls_FC2-PSPHI
      WHERE PSPID =  ls_FC2-PSPID.

      MODIFY i_t_data FROM ls_FC2 INDEX l_tabix.

    ENDLOOP.

thx to all again.

then, text datasource enhancement is in the 2s? or 3s?

former_member186445
Active Contributor
0 Kudos

the issue is solved because you need to use the exact name of the datasource, not the name of the infoobject you're loading.

texts are supposed to be in 3s although i suspect that every extractor runs through every user exit. it's for keeping things clear.

M.

Former Member
0 Kudos

dear Tibollo,

first, thank you for your quick and generous reply.

but, this below doesn't work ( in 3s )

*&---------------------------------------------------------------------*

*&  Include           ZXRSAU03

*&---------------------------------------------------------------------*

data: l_s_icctrcst like icctrcst,

      l_s_icctract like icctract,

      l_s_icctrsta like icctrsta,

      l_tabix      like sy-tabix.

CASE I_CHABASNM.

*----------------------------------------------------------------------*

* 0PROJECT_TEXT   2012.04.25  Created by leah      *

*----------------------------------------------------------------------*

  WHEN '0PROJECT_TEXT'.

    DATA: ls_FC TYPE PSBWPRJTXT.

    LOOP AT C_T_TEXTS INTO ls_FC .

      l_tabix = sy-tabix.

      SELECT SINGLE PSPNR FROM PROJ INTO ls_FC-PSPHI

      WHERE PSPID =  ls_FC-PSPID.

      MODIFY C_T_TEXTS FROM ls_FC INDEX l_tabix.

    ENDLOOP.

ENDCASE.

it doesn't work.

and below this is work. ( in 2s )

*&---------------------------------------------------------------------*

*&  Include           ZXRSAU02

*&---------------------------------------------------------------------*

data: l_s_icctrcst like icctrcst,

      l_s_icctract like icctract,

      l_s_icctrsta like icctrsta,

      l_tabix      like sy-tabix.

CASE I_DATASOURCE.

*----------------------------------------------------------------------*

* 0PROJECT_TEXT    2012.04.25  Created by leah     *

*----------------------------------------------------------------------*

  WHEN '0PROJECT_TEXT'.

    DATA: ls_FC2 TYPE PSBWPRJTXT.

    LOOP AT i_t_data INTO ls_FC2.

      l_tabix = sy-tabix.

      SELECT SINGLE PSPNR FROM PROJ INTO ls_FC2-PSPHI

      WHERE PSPID =  ls_FC2-PSPID.

      MODIFY i_t_data FROM ls_FC2 INDEX l_tabix.

    ENDLOOP.

ENDCASE.

anyway, now it(0PROJECT_TEXT) works as i want to do.

thanks.

former_member186445
Active Contributor
0 Kudos

it seems the specific user-exit for texts is obsolete (must say it's a very long time ago i used one) and indeed you need to use the same as for the attributes . I learned something today .

M.

Former Member
0 Kudos

many thnx tibollo!!

sukdev_koner2
Active Participant
0 Kudos

Yes . Your code is very fine but just modify the code as follows:

When '0PROJECT_TEXT'

then 'Rest of Code' .

Please let me know if it resolved your issue,

former_member186445
Active Contributor
0 Kudos

always nice to have a confirmation.

former_member186445
Active Contributor
0 Kudos

i think you should use

when '0PROJECT_TEXT'.