Application Development 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: 

0008 - values of bet not getting saved in pa0008

Former Member
0 Kudos

Hi allll,

Issues is, I am giving some combination for payscale type, area and group,

Then the values for basic pay wagetype 1001 appears,

But when I save the record, and see it in se11-pa0008, it shows 0.00 as value

for 1001 wt.

And to my knowledge, defaulting the 1001 with normalizes salary is done by

functional ppl.

And the flag indxx is also set for this 1001 wt.

Now, what can I as a technical person do to save the value from sceen to db table.

One more thing is, when I go to pa30-0008 in display mode, the value is there..not 0.00.

Pls suggest..

Regards,

Veeranji Reddy P.

9 REPLIES 9

Former Member
0 Kudos

Hi Vr ,

Those values will be calculated at runtime based on the config.

try this sample code.

FORM CALC_AMT USING P_BEGDA

P_ENDDA

P_BETRG

P_LGART

P_PERNR.

data: wage_amt(10),

xlgart type lgart,

xbetrg type pad_amt7s,

lgtab like it510 occurs 0 with header line.

sort it510 by lgart endda begda.

read table it510 with key trfar = i0008-trfar

trfgr = i0008-trfgr

trfgb = i0008-trfgb

trfst = i0008-trfst

lgart = p_lgart.

if sy-subrc eq 0.

if it510-begda <= p_endda and it510-endda >= p_endda.

p_betrg = it510-betrg.

else.

select single

endda

begda

betrg

from t510

into corresponding fields of lgtab

where molga = '40'

and trfar = i0008-trfar

and trfgb = i0008-trfgb

and trfgr = i0008-trfgr

and trfst = i0008-trfst

and begda <= p_endda

and endda >= p_endda

and lgart = p_lgart.

if sy-subrc eq 0.

it510-trfar = i0008-trfar.

it510-trfgr = i0008-trfgr.

it510-trfgb = i0008-trfgb.

it510-trfst = i0008-trfst.

it510-lgart = p_lgart.

it510-betrg = lgtab-betrg.

p_betrg = lgtab-betrg.

it510-endda = lgtab-endda.

it510-begda = lgtab-begda.

append it510.

clear it510.

clear lgtab.

endif.

endif.

else.

select single

endda

begda

betrg

from t510

into corresponding fields of lgtab

where molga = '40'

and trfar = i0008-trfar

and trfgb = i0008-trfgb

and trfgr = i0008-trfgr

and trfst = i0008-trfst

and begda <= p_endda

and endda >= p_endda

and lgart = p_lgart.

if sy-subrc eq 0.

it510-trfar = i0008-trfar.

it510-trfgr = i0008-trfgr.

it510-trfgb = i0008-trfgb.

it510-trfst = i0008-trfst.

it510-lgart = p_lgart.

it510-betrg = lgtab-betrg.

p_betrg = lgtab-betrg.

it510-endda = lgtab-endda.

it510-begda = lgtab-begda.

append it510.

clear it510.

clear lgtab.

endif.

endif.

if sy-subrc <> 0.

refresh t_t539j.

clear t_t539j.

select *

appending corresponding fields of table t_t539j

from t539j

where molga = '40'

and bwlga = p_lgart

and endda ge p_begda

and begda le p_begda

and gwcht ne 0.

loop at t_t539j.

read table i0008 with key pernr = p_pernr

begda = p_begda

endda = p_endda.

do 20 times varying xlgart from i0008-lga01

next i0008-lga02

varying xbetrg from i0008-bet01

next i0008-bet02.

if xlgart = t_t539j-baslg.

move xbetrg to wage_amt.

endif.

p_betrg = p_betrg + wage_amt * t_t539j-gwcht / 100.

wage_amt = 0.

enddo.

endloop.

endif.

ENDFORM. " CALC_AMT

regards

Prabhu

0 Kudos

Hi Prabhu,

With this code, I may get some problem like,

If I want to change the value for 1001, it will not allow me...

(I am geeting the values from t510 table....)

The requirement is, we have to default it(1001).

If user changes, it should agree.

if he deletes it, it should agree.

if he do nothing, then default......

I guess a bit tough one...

But Thanks u for a good answer...

Regards,

Veeranji Reddy P.

0 Kudos

Hi VR ,

its not like that , once u enter value in that amount fields , then it will accept & override its values from config settings .

Indicator for indirect valuation(INDBW)--->will tell me how values got populated for the WT ,just try to delimit the old record and create a new one with some amt , then u can see it in IT08 table.

regards

Prabhu

0 Kudos

I think 1001 is calculated indirectly ..

In Infotype PA0008 if U find the wagetype 1001 in LGA01 then check for the field IND01 ..

if IND01 is 'X' that means 1001 is calculated indirectly.

If U want to give some value to this field then try to change IND01(I don't think this will allow)

0 Kudos

Hi both - Prabhu and Vas...

Prabhu: Ind will tell us that whether it is calculated by user or indirectly by config...

But, If i do the coding as u said in a exit, it will default the value from table t510...

and if the user wants it to change the value manually?? it will not allow...

Vas: If i change the Ind value to Null or SPACE, it is not giving the values for 1001.

(bet01).

Or it will give the value from table t510 and will set the ind flag.

Thank both for ur fast and solvable replys.....

If u want more clearly I will give more scenario to u...

Regards,

Veeranji Reddy P.

0 Kudos

Hi ,

have u creating any upload program ? , what kind of errors u are getting while creating record for WT1001 with ur own values ? , i think it wont be a probs ?.

so what stoping u to do that ?

regards

Prabhu

Edited by: Prabhu Peram on Feb 27, 2009 2:10 PM

0 Kudos

Actually, I am doing some calculations using exit.....

For some type area and group i will calculate wt 1001, 1003 based on 1002(if present).

For other type of pernrs, config will do the calc and give the values for 1001 1003.

But, if config is doing the defaulting, it is not updated in database.

On screen the values are being fetched.....

Now, what i want is to save the values defaulted by config to database.

No structure is there where i can get the screen values...

Finally, i want the screen values to be saved to db.

I guess the explanation is clear to some extent.

Regards,

Veeranji Reddy P.

0 Kudos

so whatts the point to update IT08 tables ? anyhow u can see those values if u goto pa30 so i'm not able to understand ur requirement , what u can do is , give them a report in which u can use my code to fetch the data and display them as a output..

regards

Prabhu

0 Kudos

Hi.....

Actually, we are having different reports where we are using pa0008 as base..

Not using, have to, or must use pa0008.

Our testing people will go to pa30 and 0008 and will check the values..

On screen the value is 1348 and in table the value is 0.00. the calculated value will be diff..

if i can save these val;ues in db form screen, the issue is solved.

What i explaned is a simple case..there is tooooo complex case also, that even i cannot

explain...

Thank and Regards,

Veeranji Reddy P