Application Development and Automation 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: 
Read only

RFC to update User Master Data

Former Member
0 Likes
2,043

Hi Experts,

I need to create an RFC , that should be called from some external program.
When the following RFC is called, it will be provided with USERID, MOBILE NUMBER, OFFICE NUMBER from SAP HR Master Records

I am supposed to check, if the USERID exists in SAP or not.
If it exists i need to use that information and update the UserID with that data
If the user ID doesnt exist i need to pass a message that userID doesnt exist in SAP as a error message.
I am supposed to use BAPIRET2 for this.

Please help me out, on the data elements i need to use for the importing parameters and how i need to proceed on the source code.
Thanks in advance, this will be a great help.
Thanks again.

Regards,
SG

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,637

Hi,

     First you find what SAP Standard T-code  you used to Updating or Creating this Master Record
(help of functional consultant)    

  •           Finding RFC/BAPI for that SAP Standard T-code
               Example your SAP T-code is 'PA30' (Updating or Creating Master Record )
              
  • finding Package name using SE93 (click on package name , in this case Package .. >"PBAS")
  • then select properties tab--> check "
  • Applic. Component" (in dis case "PA-PA" ,Personnel Administration)
  • go to BAPI T-code-->Personnel Management-->
  • Personnel Administration-->EmployeePersonalData(click and Check component == 'PA-PA')
  • EmployeePersonalData
    • Create (BAPI_PERSDATA_CREATE)
    • Change(BAPI_PERSDATA_CHANGE)
  • mean's this is the exact BAPI/RFC for the T-code 'PA30'
  • So, you find your Exact BAPI/RFC following above steps .

Regards

Smruti Ranjan

Hi Experts,

I need to create an RFC , that should be called from some external program.
When the following RFC is called, it will be provided with USERID, MOBILE NUMBER, OFFICE NUMBER from SAP HR Master Records

I am supposed to check, if the USERID exists in SAP or not.
If it exists i need to use that information and update the UserID with that data
If the user ID doesnt exist i need to pass a message that userID doesnt exist in SAP as a error message.
I am supposed to use BAPIRET2 for this.

Please help me out, on the data elements i need to use for the importing parameters and how i need to proceed on the source code.
Thanks in advance, this will be a great help.
Thanks again.

Regards,
SG

8 REPLIES 8
Read only

VijayCR
Active Contributor
0 Likes
1,637

Hi Snigdha,

     You can use the BAPI "BAPI_ADDRESSORG_CHANGE" for the Updation of the USERID, MOBILE NUMBER, OFFICE NUMBER from SAP HR Master Records into the USER MASTER.

Thanks,

Vijay.

Read only

Former Member
0 Likes
1,637

Hi Vijay,

Thanks for the immediate reply.

Am i supposed to use this bapi as an associated type in the import parameters?
Let me also make clear that, Userid, officenum, mbl num, fax will be passed as export parameters from an external source, and in our rfc we are supposed to check, if the userid exists in sap and update the information.
please also tell me, where i need to update the information?
Thanks!!

Read only

VijayCR
Active Contributor
0 Likes
1,637

As menioned by Venakt You can make use of those FM's to Check the USer ID.

thank you,

Vijay.

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,637

Check the below FMs

BAPI_USER_EXISTENCE_CHECK
/RSC/SI_SUSR_USER_CHECK_EXIST

/RSC/SI_BAPI_USER_EXIST_CHECK

UACC_CHECK_RFC_USER_EXISTS

hope this helps

Read only

Former Member
0 Likes
1,638

Hi,

     First you find what SAP Standard T-code  you used to Updating or Creating this Master Record
(help of functional consultant)    

  •           Finding RFC/BAPI for that SAP Standard T-code
               Example your SAP T-code is 'PA30' (Updating or Creating Master Record )
              
  • finding Package name using SE93 (click on package name , in this case Package .. >"PBAS")
  • then select properties tab--> check "
  • Applic. Component" (in dis case "PA-PA" ,Personnel Administration)
  • go to BAPI T-code-->Personnel Management-->
  • Personnel Administration-->EmployeePersonalData(click and Check component == 'PA-PA')
  • EmployeePersonalData
    • Create (BAPI_PERSDATA_CREATE)
    • Change(BAPI_PERSDATA_CHANGE)
  • mean's this is the exact BAPI/RFC for the T-code 'PA30'
  • So, you find your Exact BAPI/RFC following above steps .

Regards

Smruti Ranjan

Read only

0 Likes
1,637

Thanks all, that was really helpful.
Thanks a million

Read only

0 Likes
1,637

Thanks all, that was really helpful.
Thanks a million

Read only

0 Likes
1,637

Thanks all, that was really helpful.
Thanks a million