Welcome To My BLOG

This site is to give a brief idea for the abap learners who are looking for some real time programs .It consists of collection of programs from my side . I hope these programs are very much used for all of the learners. Please check the links for any information in ABAP.
Please vote for my Blog. And please input me on this mail addrssess.Email me

Share this link with your friends

http://www.rebtel.com/u/15163104576

For every friend who signs up using this link and makes a payment, we'll give you 8 €!


Thursday, September 23, 2010

Simple program with ldb pnp

report.

tables:pernr,t528t.

infotypes:0001,0008.
data : begin of itab occurs 0,
pernr like p0001-pernr,
sname like p0001-sname,
plans like p0001-plans,
begda like p0001-begda,
endda like p0001-endda,
ptext like t528t-plstx,
ANSAL like p0008-ANSAL,
end of itab.


start-of-selection.
get pernr.

itab-pernr = pernr-pernr.

rp_provide_from_frst p0001 space pn-begda pn-endda .
IF pnp-sw-found = 1.
itab-sname = p0001-sname.
itab-plans = p0001-plans.
itab-begda = p0001-begda.
itab-endda = p0001-endda.
endif.

rp_provide_from_frst p0008 space pn-begda pn-endda .
IF pnp-sw-found = 1.
itab-ansal = p0008-ansal.
endif.


data : vtext(50) type c.
select single plstx into vtext
from t528t
where plans = itab-plans
and SPRSL = 'EN'.
if sy-subrc eq 0.
itab-ptext = vtext.
endif.
append itab.

end-of-selection.

clear itab.
loop at itab.
write:/ itab-pernr,
itab-sname,
itab-plans,
itab-begda,
itab-endda,
itab-ansal.
endloop.

No comments: