Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using Provide statement in HR programming

Former Member
0 Likes
599

Hi,

Im using the code below;

PROVIDE FROM p2001 BETWEEN pn-begda AND pn-endda

WHERE p2001-subty = '0101'.

ENDPROVIDE.

But the subty = 0101 doesnt seem to be working. When i look at the p2001 table after i execute the code, it does limit within the date range but not the subtype.

Thanks

3 REPLIES 3
Read only

MarcinPciak
Active Contributor
0 Likes
565

Hi,

Use AWART instead of SUBTY

PROVIDE * FROM p2001 BETWEEN pn-begda AND pn-endda

WHERE p2001-awart = '0101'.

ENDPROVIDE.

Pls reward if helpfull:)

Regards,

Marcin

Read only

Former Member
0 Likes
565

Didnt work....p2001 still returning everthing

Read only

Former Member
0 Likes
565

hi,

DATA i_2001 TYPE p2001 OCCURS 0 WITH HEADER LINE.

TYPES: BEGIN OF i_output,

v_AWART TYPE p2001-AWART,

END OF i_output.

DATA : it_out TYPE STANDARD TABLE OF i_output INITIAL SIZE 0,

wa_output TYPE i_output.

START-OF-SELECTION.

GET pernr.

rp_provide_from_last p2001 space pn-begda pn-endda.

CHECK p2001-SUBTY = '0101'.

LOOP AT p2001 WHERE begda GE pn-begda

AND begda LE pn-endda.

MOVE-CORRESPONDING p2001 TO i_2001.

APPEND i_2001.

DELETE p2001.

ENDLOOP.

wa_output-v_AWART = i_0000-AWART.

IF p2001-begda GE pn-begda AND p2001-begda LE pn-endda.

APPEND wa_output TO it_out.

ENDIF.

REFRESH i_20001[].

CLEAR i_2001.

REGARDS,

sreelakshmi

Edited by: Sreelakshmi p on Jun 23, 2008 3:02 PM