2008 Oct 23 6:21 AM
Hi,
I have to generate a no. and the generated number should be diplayed in the status bar and this logic has to be written in a function module (YOM_ABCD). So when i call this function module, if the number gets generated, will this number be shown in the status bar if i try to show this number through a message. Or do i need to get that generated number out of the function module through some importing parameter and then display it in the status bar?
Using Message Statement you can show your number on the status bar, Use Type 'I' to show it in a popup box.
Regards
Karthik D
2008 Oct 23 6:23 AM
Hi,
Use the function module NUMBER_GET_NEXT to generate number ranges.
Create the number range object in TCODE : SNUM
Once done proceed as follows
Func modules NUMBER_RANGE_ENQUEUE -> NUMBER_GET_NEXT -> NUMBER_RANGE_DEQUEUE
Regards
Edited by: Rajvansh Ravi on Oct 23, 2008 7:24 AM
2008 Oct 23 6:26 AM
Hi,
the sample program is shown below..
Following is a test program to get the next available number of the object created above:
REPORT zsnro_test.
DATA:
NUMBER TYPE I.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZDEMO'
IMPORTING
NUMBER = NUMBER
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 <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
You can use this number now to show it on the status bar..
Regards
Mudit
2008 Oct 23 6:39 AM
Hey guys,
I guess you did not get my question. I am using the fn. module NUMBER_GET_NEXT in a custom function module YOM_ABCD. So when i call the function module YOM_ABCD in my program, the number which gets generated, will it be displayed in the status bar or not?
Thanks,
Ibrahim
2008 Oct 23 6:49 AM
Using Message Statement you can show your number on the status bar, Use Type 'I' to show it in a popup box.
Regards
Karthik D
2008 Oct 23 6:39 AM
Hi,
Just output it as
Message number type 'S'. "inside the FM..
Edited by: Sukriti Saha on Oct 23, 2008 11:10 AM
2008 Oct 23 11:21 AM
Thanks guys,
My requirement has been changed. I dont need to write my logic in a function module now.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |