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: 

Want to save address in IT0006 with country only

0 Kudos

Hi ,

I have a requirement where i want to save the address in IT0006 , but with country(LAND1) and field ORT01 , begin date and end date , subty only .

From  HR_INFOTYPE_OPERATION i m passing these parameters , but it throws error and says "Fill in all required entry fields"  .

But when i save a record from PA30 with these parameters only , then it allows me to save the data .

Please let me know the other FM or how to use HR_INFOTYPE_OPERATION  correctly .

I tried but not working .

I am using the code  :

p0006-pernr = '00529797'    .

p0006-subty = 'WL06'    .

p0006-begda = sy-datum    .

p0006-endda = '99991231'          .

p0006-anssa = 'WL06' .

p0006-ort01 = 'TEST' .                

p0006-land1 = 'AF' .

APPEND p0006.

CLEAR  p0006.


LOOP AT p0006.

   CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'

     EXPORTING

       number = p0006-pernr.

   CALL FUNCTION 'HR_INFOTYPE_OPERATION'

     EXPORTING

       infty            = '0006'

       number           = p0006-pernr

       subtype          = 'WL06'

*     OBJECTID         =

*     LOCKINDICATOR    =

       validityend      = '99991231'

       validitybegin    = sy-datum

*      record           = p0006

       operation        = 'INS'

     IMPORTING

       return           = return

     .

   IF  return IS INITIAL.

     WRITE 'Successfully records created'.

   ELSE.

     WRITE 'Error'.

   ENDIF.

   CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'

     EXPORTING

       number = p0006-pernr.

ENDLOOP.

Thanks,

Sachin Sharma

1 REPLY 1

Former Member
0 Kudos

Hi,

Please follow the below suggestion

1)

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

     EXPORTING

       infty            = '0006'

       number           = p0006-pernr

       subtype          = 'WL06'

*     OBJECTID         =

*     LOCKINDICATOR    =

       validityend      = '99991231'  

       validitybegin    = sy-datum

*      record           = p0006            ******Uncomment this

       operation        = 'INS'

     IMPORTING

       return           = return


2) add this


p0006-infty = '0006'.



Try this , it will work



Thanks and Regards,

Vijayakumar SR