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

OBJECTS

Former Member
0 Likes
516

CAN ANYBODY HELP ME HOW TO CREATE OBJECTS.

MY PROG. IS I'M USING

NUMBER_GET_NEXT FUNCTION TO GET NEW NO.

IN THIS FUNCTION I HAVE TO PASS OBJECT NAME .

I WANT TO KNOW HOW TO CREATE THAT OBJECT.

BECAUSE IN THIS OBJECT I HAVE TO DEFINE FROM WICH TABLE I WANT TO PICK LATEST NO AND WHAT IS THE NO. FILED AND ON WHICH FIELD IT DEPENDS.

FOR EXP.

ZMYTAB ID ZTABLE

FIELDS

WORKS

EMPLOYEE_NO

THIS IS MY CONTROL TABLE FOR NO. RANGES.

I WANT LATEST NO IN THIS AND WANT TO 1 INCREASE IN IT.

MUKESH

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
475

Hi,

use the TCODE 'SNUM' to create the Number Range Obect and use in the function module.

SNRO is to maintain number ranges for that object.

reward if useful,

regards,

anji

3 REPLIES 3
Read only

Former Member
0 Likes
475

Hi mukesh,

In this sistuation u have to create a number range object using the transaction code SNRO.in that u can create intervals for the number range.this number range has to be included in ur table.this number range has to be stored into and internal table and this internal table number has to be provided to the fnction module.

SELECT NUM_RANGE FROM Z_GLOBAL INTO TABLE ITAB_GLOBAL.

LOOP AT ITAB_GLOBAL.

*This function assigns the next free number.

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

NR_RANGE_NR = ITAB_GLOBAL-NUM_RANGE

OBJECT = 'ZABC_001'

  • QUANTITY = '1'

  • SUBOBJECT = ' '

  • TOYEAR = '0000'

  • IGNORE_BUFFER = ' '

IMPORTING

NUMBER = TRANSACT_NUM

  • QUANTITY =

  • 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

I think the object will be created by functional people.

regards,

Prajith

.

Read only

Former Member
0 Likes
476

Hi,

use the TCODE 'SNUM' to create the Number Range Obect and use in the function module.

SNRO is to maintain number ranges for that object.

reward if useful,

regards,

anji

Read only

Former Member
0 Likes
475

solved, thanks