on 04-25-2012 12:08 PM
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think you should use
when '0PROJECT_TEXT'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.