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: 

BAPI 'HRXSS_PER_NEW_P0006_US' not saving the changes

former_member224405
Participant
0 Kudos

Hi All,

I am using BAPI 'HRXSS_PER_NEW_P0006_US' to add record in info type 0006 (address) for sub type 0002 (Mailing)

i am using BAPI 'HRXSS_PER_NEW_P0006_US' and after the call in structure record is getting created with default data

but after which i papulate necessary data and call 'HRXSS_PER_NEW_P0006_US' & 'COMMIT i am unable to view the record

in table PA006 or at TCODE level PA20.


Kindly provide your useful comments.


Thanks,

6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos

Did you look at returned parameter MESSAGES (structure BAPIRET2 like a BAPI RETURN) for error messages before commiting?

Regards,

Raymond

0 Kudos

Hi Thanks Raymond for your reply.

Yes i did check it is initial with no messages and lw_recd is having the record needs to be created

as below.

Here is the snippet below.

CALL FUNCTION 'HRXSS_PER_NEW_P0006_US'

           EXPORTING

             infty    = lc_inft

             subty    = lv_subtyp

*           ITBLD    =

           IMPORTING

             record   = lw_recd

             messages = lt_msgs.


if lw_recd is not initial.


     adding mandatory values to the structure needs to be created.


          lw_recd-name2 im_empdetails-name2.

           lw_recd-stras im_empdetails-stras.

           lw_recd-locat im_empdetails-locat.

           lw_recd-ort01 im_empdetails-city.

           lw_recd-state im_empdetails-state.

           lw_recd-pstlz im_empdetails-pstlz.



endif.


CALL FUNCTION 'HRXSS_PER_SAVE'


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.


I see this BAPI used almost no.


Thanks,

0 Kudos

Be aware that HRXSS_PER_SAVE too may return errors.

Regards,

Raymond

0 Kudos

Hi Raymond

I checked but no luck !!

kindly give me the code sample if you find it.

Message Tab is blank with no messages.

Thanks,

0 Kudos
  • Seems you forget the HRXSS_PER_MODIFY_P0006_US to change current value of record ?
  • Also try to remove the commit, AFAIK the SAVE will do the commit for you (since 2006?)

Regards,

Raymond

0 Kudos

Hi Raymond

I have used HRXSS_PER_MODIFY_P0006_US to modify the existing record created already and it is working fine no issues


But in this scenario i am creating a new record for sub type 2 hence i am using  HRXSS_PER_NEW_P0006_US

Thanks,