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

Bapi / RH_GET_PARTIC_CANCELLATION

Former Member
0 Likes
975

Hey Guys

Hoping that someone can help me.

Has anyone used the BAPI RH_GET_PARTIC_CANCELLATION

Reason being i have developed a Web Dynpro Application that through Ess or Mss it allows the user to see there training records.

Now i have been using this BAPI BAPI_ATTENDEE_BOOK_LIST to get the training record back by feeding it the Personnel number. But this Bapi only stores the completed training events that have been completed by the user.

In order for me to get the cancelled training data i have been using RH_GET_CANCELLATION_DATA by also feeding this the personnel number but it wont bring back the user or dates or times just the reason for cancellation.

The bapi that i have mentioned at the top will bring back this information but i am having trouble using it. it seems i have to run it first populate an internal table then run it again with certain info types

This may not make any sense at all but if anyone can help will be very grateful thank you

Shaun

1 ACCEPTED SOLUTION
Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
930

Moderator message: nothing Web Dynpro specific here so I moved the thread to ABAP general.

On a side note, if the function module isn't named BAPI_* then it probably isn't actually a BAPI. More than semantics, it might mean that this function module is designed to run standalone or dark.

Hey Guys

Hoping that someone can help me.

Has anyone used the BAPI RH_GET_PARTIC_CANCELLATION

Reason being i have developed a Web Dynpro Application that through Ess or Mss it allows the user to see there training records.

Now i have been using this BAPI BAPI_ATTENDEE_BOOK_LIST to get the training record back by feeding it the Personnel number. But this Bapi only stores the completed training events that have been completed by the user.

In order for me to get the cancelled training data i have been using RH_GET_CANCELLATION_DATA by also feeding this the personnel number but it wont bring back the user or dates or times just the reason for cancellation.

The bapi that i have mentioned at the top will bring back this information but i am having trouble using it. it seems i have to run it first populate an internal table then run it again with certain info types

This may not make any sense at all but if anyone can help will be very grateful thank you

Shaun

5 REPLIES 5
Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
931

Moderator message: nothing Web Dynpro specific here so I moved the thread to ABAP general.

On a side note, if the function module isn't named BAPI_* then it probably isn't actually a BAPI. More than semantics, it might mean that this function module is designed to run standalone or dark.

Read only

Former Member
0 Likes
930

To get the participation cancellation details you can query the table HRP1001 with

Otype = 'P'

Objid = Personnel Number

Rsign = 'B'

Relat = '040'

The SOBID returned will hold the business event. BEGDA and ENDDA will hold the training duration period.

To use the FM RH_GET_CANCELLATION_DATA pass the personnel number details in the PARTIC_TAB table. Also, make sure the the employee queried is having valid records in IT0000, IT0001 and IT0002 for the period.

Regards

Ranganath

Read only

Former Member
0 Likes
930

Thank you very much for getting back to me so quick..

So in my code how do i populate the partic_tab this is my first time using a FM like this one i have this code in my webdynpro but i need to poulate that table before it runs is that correct.

Sorry im new to all this

CALL FUNCTION 'RH_GET_PARTIC_CANCELLATION'

EXPORTING

BEGDA = '19000101'

ENDDA = '99991231'

  • _ISTAT = ' '

  • SORT = 'X'

  • EVTYP =

  • REASON =

  • AUTH_SOBID = ' '

TABLES

partic_tab =

  • stor_tab =

  • INFOTYPE_1001 =

  • EXCEPTIONS

  • NO_PARTICIPANT_FOUND = 1

  • WRONG_OTYPE = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

Read only

0 Likes
930

partic_tab has 3 fields. Populate the fields as below,

partic_tab-plvar = '01' Generally it will be '01', else check in table t77s0 for values 'PLOGI' and 'PLOGI', use the value from GSVAL field

partic_tab-otype = 'P'

partic_tab-objid = Personnel Number.

append partic_tab.

ISTAT can be passed based on what kind of records you need. Below are the possible values

1 Active

2 Planned

3 Submitted

4 Approved

5 Rejected

The output will be available in stor_tab table.

Regards

Ranganath

Read only

0 Likes
930

Brilliant thanks very much i will give that a go and get back to you thanks again

Shaun