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: 

Can we set 'flag1' field in table PA0015?

Former Member
0 Kudos

Can we set the 'flag1' field in table PA0015 to 'X' by using ABAP code?

If yes, can anyone show me the code?

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Why do you need to modify a standard table using abap code ?

use the help for modify statement or update to do it.

syntax : modify PA0015 from itab.

declare itab as table of type PA0015. and assign all the values of the changed row.

regards,

Sandeep Josyula

*Reward if helpful

3 REPLIES 3

Former Member
0 Kudos

Why do you need to modify a standard table using abap code ?

use the help for modify statement or update to do it.

syntax : modify PA0015 from itab.

declare itab as table of type PA0015. and assign all the values of the changed row.

regards,

Sandeep Josyula

*Reward if helpful

0 Kudos

i'm using this code currently:

li_wa_itab_0015-flag1 = 'X'.

li_wa_itab_0015-sprps = l_itab_0015-sprps.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0015'

number = li_wa_itab_0015-pernr

subtype = li_wa_itab_0015-subty

objectid = li_wa_itab_0015-objps

lockindicator = 'X'

validityend = li_wa_itab_0015-endda

validitybegin = li_wa_itab_0015-begda

recordnumber = li_wa_itab_0015-seqnr

record = li_wa_itab_0015

operation = 'MOD'

IMPORTING

return = l_return.

This code is not work (the flag1 field is not set to 'X' after execute).

0 Kudos

Hi Irene,

You cant update the FLAG1 field in PA0015 using the function HR_INFOTYPE_OPERATION. The only way to update this field is using the abap code.

modify PA0015 from table itab.

I am assuming that itab contains the records from table PA0015 where the FLAG1 field needs to be update.

Hope this helps.

  • Note the FLAG1 field is reserved by SAP. Also it is not recommended to directly update the database.

Regards,

Pulkit

Message was edited by: Pulkit