Skip to Content
author's profile photo Former Member
Former Member

Doubt in document no Generation

hi Guys,

Right now i am working in Dialog Programming.Material is transfered from PointA to PointB and at PointB they are scanning the material using the barcode scanner.

Once they scanned all the material and save i should create a Document No ( between a range of 40000-49999).

I need clarrifiacation on how to generate the document number ??*

is there any function module to read last document no ??

Regards,

Karthik.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 09:56 AM

    Hi,

    data  : gexno(10).
    call function 'NUMBER_GET_NEXT'
                    exporting
                      nr_range_nr             = '01'
                      object                  = 'ZGPNO'
                    importing
                      number                  = gexno
                    exceptions
                      interval_not_found      = 1
                      number_range_not_intern = 2
                      objec
                      t_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.

    tcode for creating Number range oblect : SNRO

    CREATE OBLECT EX : ZGPNO

    Create Number ranges as u wish like

    ex.

    01 - 400000 - 499999

    <REMOVED BY MODERATOR>

    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 5:45 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.