cancel
Showing results for 
Search instead for 
Did you mean: 

New Leave Request ID,

former_member199125
Active Contributor
0 Kudos

Hi,

Manually if i create a leave in IT 2001, i can leaverequest id in PTARQ transaction. But am unable to see that request id in PTREQ_HEADER table.I dont know why it is not showing.

In my screen I have data like, pernr, leave start date, enddate and type of leave.

Once enduser click on submit button, i should be able to create new leave request id,

Withe these data, how can i create a leave request ID.

Please help me in this, I am struggling for this from past 2 days.

Regards

Srinivas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sana,

Have you look into these FMs.

PT_ARQ_REQUEST_PREPARE

PT_ARQ_REQUEST_CHECK

PT_ARQ_REQUEST_EXECUTE

Please go through this..

Cheers,

Kris.

former_member199125
Active Contributor
0 Kudos

Hi kris,

In the PT_ARQ_REQUEST_PREPARE function module, where shuld I pass the start and enddate values in order to create a request?

I dont see any related parameters in above function modules.

Pls guide me in this.

Regards

Srinivas

Former Member
former_member199125
Active Contributor
0 Kudos

HI Kris

i already gone through these links,

but i am unable to find what exactly those parameters are inteded for? i din't see any parameters related to start and enddate.

Help me in this clearly, i am not aware of those FM's.

Regards

Srinivas

former_member199125
Active Contributor
0 Kudos

HI Kris

i already gone through these links,

but i am unable to find what exactly those parameters are inteded for? i din't see any parameters related to start and enddate.

Help me in this clearly, i am not aware of those FM's.

Regards

Srinivas

former_member199125
Active Contributor
0 Kudos

Kris,

FYI, i am developing custom leave application, am not using standard ESS application. So i think these function modules wont work for me, so now you have any idea for creating unique leave request id for custom leave application?

Regards

Srinvias

Former Member
0 Kudos

Hi Srinivas,

You generate any unique ID's... You ahve to find Number range object for that. Contact Functional to know that.

( for leave request id ).

T-Code for Number range maintenance : SNRO

Based on Number range you have to generate numbers by using NUMBER_GET_NEXT

check this example :

CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
    EXPORTING
      object           = 'RV_TRANSPO'   // This is number range object.
    EXCEPTIONS
      foreign_lock     = 1
      object_not_found = 2
      system_failure   = 3
      OTHERS           = 4.
  IF sy-subrc NE 0.
* message e086 with 'Lock error' sy-subrc.
  ENDIF.

  CALL FUNCTION 'NUMBER_GET_NEXT'
   EXPORTING
    nr_range_nr = '01'
    object = 'RV_TRANSPO'
* QUANTITY = '1'
* SUBOBJECT = ' '
* TOYEAR = '0000'
* IGNORE_BUFFER = ' '
   IMPORTING
    number = lv_protnum " Number generated by Range Generator Object
* QUANTITY =
* RETURNCODE = lv_returncode
   EXCEPTIONS
    interval_not_found = 1
    number_range_not_intern = 2
    object_not_found = 3
    quantity_is_0 = 4
    quantity_is_not_1 = 5
    interval_overflow = 6
    buffer_overflow = 7
    OTHERS = 8.

  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE 'A' NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.


  CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
    EXPORTING
      object = le_rangeobj.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

Cheers,

Kris.

former_member199125
Active Contributor
0 Kudos

kris,

thank you very much for information,

As this is a custom application, so now , do i have to inform my function people to create a number range object for leave request id?

I tried to create number range myself, it is giving information like..object should save in SAP package... So i have a confusion. abt this...

Regards

Srinivas

Former Member
0 Kudos

Hi Srinivas,

Leave requests are generated na. i mean through ECC you are able to create request id and they are stored in tables right.

That means no need to create new one. just use same object which used by Standard. for that ask functional. You have to use same object other wise when you create request through your program, it may generate different series of request ids.

You have to create same series of ids. otherwise mismatch will occur.

If you have any doubts pelase contact Functional about number range object they will help u.

Cheers,

Kris.

former_member199125
Active Contributor
0 Kudos

Kris,

If I use standard ESS leave application, then it will automatically create leave request id , here mine is custom application , so ,i think my application is no where related to standard tables like ptreq_header.......

In my application... using start date, enddate and type of leave information .. i can create leave request manually by passing data to IT 2001 with my own request id( using snro ) . but when I create a leave , corresponding standard request id also creating... ( this request id i can see in PTARQ TCODE--->check documents option , but it is not showing in PTREQ_HEADER table ).

Now is there any way to stop the creating standard request id , when i pass the data ( start date, enddate and type of leave ) to pa20001 ?

Thanks in advance

Srinivas

former_member199125
Active Contributor
0 Kudos

hI KRIS,

Hi

when i am generating new request number using number_get_next function module,

am getting error like For object ZLVREQID , number range interval 01 does not exist

But i already defind the interval 01. I am unable to generate new number

Regards

Srinivas