SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Calculated wage type value (if P0008-bet01 value is initial)



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> HR
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sat Oct 13, 2007 1:05 pm    Post subject: Calculated wage type value (if P0008-bet01 value is initial) Reply with quote

If retrieved P0008-bet01 is initial then value needs to be retrieved using this method.

When looking at infotypes via PA20 you may see a value in a particular wage type which may not
exist when you read the infotype from within your program. This could be because this particular
wage type is calculated rather than input directaly into the infotype. The following code allows you
to retrieve the actual value of the wage from within you program. There is example code for infotypes
0008 and 0014 but the code may be slightly different for other infotypes
*Code used for retrieving wage value from infotype 0008
data: gd_bet01 type pad_amt7s.
constants: c_molga type molga value '08'. "Value can be retrieved dynamically

Code:
    SELECT SINGLE betrg INTO gd_bet01
      FROM t510
     WHERE molga =  c_molga AND
           trfar =  p0008-trfar AND
           trfgb =  p0008-trfgb AND
           trfgr =  p0008-trfgr AND
           begda <= p0015-begda AND
           endda >= p0015-begda.


*Code used for retrieving wage value from infotype 0014
data: gd_bet01           type pad_amt7s.
constants: c_molga       type molga     value  '08'.  "Value can be retrieved dynamically

    SELECT SINGLE betrg INTO ld_bet01
      FROM t510
     WHERE molga =  c_molga        AND
           trfar =  p0008-trfar    AND
           trfgb =  p0008-trfgb    AND
           lgart =  wa_p0014-lgart AND
           begda <= wa_p0014-begda AND
           endda >= wa_p0014-begda.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> HR All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.