2005 Nov 25 5:26 AM
Hi,
I have problem that is if i want to copy the data from infotype to internal table means
Provide * from p9012 between pn-begda and pn-endda.
if p9012-zz_client_c EQ itemp-z_client_c.
MOVE: p9012-begda TO it9012-begda,
p9012-zz_dept_c TO it9012-z_dept_c,
SORT IT9012 BY z_dept_c.
append it9012.
endif.
endprovide.
this one not copying data from infotype to internaltable.
what i can do?
Thanks,
Regards,
Nandha
2005 Nov 25 5:47 AM
Hi,
i didn't use if condition means it's populated.If i use if condition.i am not getting any data.
Nandha
Hi,
I have problem that is if i want to copy the data from infotype to internal table means
Provide * from p9012 between pn-begda and pn-endda.
if p9012-zz_client_c EQ itemp-z_client_c.
MOVE: p9012-begda TO it9012-begda,
p9012-zz_dept_c TO it9012-z_dept_c,
SORT IT9012 BY z_dept_c.
append it9012.
endif.
endprovide.
this one not copying data from infotype to internaltable.
what i can do?
Thanks,
Regards,
Nandha
2005 Nov 25 5:34 AM
Pls check this once -
MOVE: p9012-begda TO it9012-begda,
p9012-zz_dept_c TO it9012-z_dept_c,
SORT IT9012 BY z_dept_c.
append it9012.
In above code you have sort before Append. This can cause the problem. Can you first append entry and then sort.
2005 Nov 25 5:36 AM
HI Use this code example..
plz reward poins if it helps you..
&----
& Report ZSAPHR_PNP
*& *
&----
*& *
*& *
&----
Report ZSAPHR_PNP.
TABLES : PERNR.
*Infotype Declaration
INFOTYPES: 0002, "PERSONAL DATA
0006, "ADDRESS
0008, "
0000, "
0001. "ACTIONS
DATA : BEGIN OF ITAB OCCURS 10, "INTERNAL TABLE DECLARATION
NACHN LIKE P0002-NACHN,
VORNA LIKE P0002-VORNA,
GESCH LIKE P0002-GESCH,
GBDAT LIKE P0002-GBDAT,
FAMST LIKE P0002-FAMST,
HSNMR LIKE P0006-HSNMR,
STRAS LIKE P0006-STRAS,
LOCAT LIKE P0006-LOCAT,
PSTLZ LIKE P0006-PSTLZ,
LAND1 LIKE P0006-LAND1,
PLANS LIKE P0001-PLANS,
ORGEH LIKE P0001-ORGEH,
BET01 LIKE P0008-BET01,
WAERS LIKE P0008-WAERS,
PERNR LIKE P0000-PERNR,
END OF ITAB.
DATA: G_REPID LIKE SY-REPID."Report name
INITIALIZATION.
G_REPID = SY-REPID.
PNPTIMED = 'D'.
**********************************************START OF
SELECTION*****************************************
START-OF-SELECTION.
GET PERNR.
PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.
ITAB-PERNR = P0000-PERNR.
ITAB-NACHN = P0002-NACHN.
ITAB-VORNA = P0002-VORNA.
IF P0002-FAMST = '0'.
ITAB-FAMST = 'S'.
ELSE.
ITAB-FAMST = 'M'.
ENDIF.
ITAB-FAMST = P0002-FAMST.
IF P0002-GESCH = '1'.
ITAB-GESCH = 'M'.
ELSE.
ITAB-GESCH = 'F'.
ENDIF.
ITAB-GBDAT = P0002-GBDAT.
ITAB-HSNMR = P0006-HSNMR.
ITAB-STRAS = P0006-STRAS.
ITAB-LOCAT = P0006-LOCAT.
ITAB-PSTLZ = P0006-PSTLZ.
ITAB-LAND1 = P0006-LAND1.
ITAB-ORGEH = P0001-ORGEH.
ITAB-PLANS = P0001-PLANS.
ITAB-BET01 = P0008-BET01.
ITAB-WAERS = P0008-WAERS.
APPEND ITAB.
ENDPROVIDE.
END-OF-SELECTION.
2005 Nov 25 5:40 AM
2005 Nov 25 5:44 AM
Have you checked in debug mode if there is any value getting populated?
2005 Nov 25 5:47 AM
Hi,
i didn't use if condition means it's populated.If i use if condition.i am not getting any data.
Nandha
2005 Nov 25 5:49 AM
Check in debug for if p9012-zz_client_c and itemp-z_client_c values. Also have you moved sort after append?
Try this once. I feel the IF condition is not getting satsified. Pls check once.
2005 Nov 25 6:40 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |