on 06-21-2011 12:15 PM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sana,
Pelase go through this...
http://help.sap.com/saphelp_erp2005/helpdata/en/73/8eaf40a90c952ae10000000a155106/content.htm
Cheers,
Kris.
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.
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
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.
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
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.