Ansicht
Dokumentation
/AIN/SSCC_GET_NEXT_NRRANGE - Get Next Serial Reference for SSCC
PERFORM Short Reference Addresses (Business Address Services)This documentation is copyright by SAP AG.
Functionality
This function module gets the serial reference for the SSCC based on encoding type and company prefix.
The interface of the function module has changed from that delivered in SAP Auto-ID Infrastructure (SAP AII ) 2.1. This is NOT A RELEASED function module and is not supported by SAP. However, anybody who has called this function module with old interface can make the changes as explained below to his / her call to get equivalent results.
Example
The data elements, table types, and structures used below are NOT released by SAP and can change in future. The interface of the function module can also change.
A typical call for the old interface would have been:
DATA:
,,lv_next_number ,,TYPE /ain/epc_current ,
,,lv_epc_type ,,TYPE /ain/epc_type,
,,lv_company_prefix TYPE /ain/epc_prefix,
,,lt_ret_msg ,,TYPE bapirettab.
lv_epc_type = 'SSCC-96'.
lv_company_prefix = ' 0037000'.,,,,,,"a company prefix for which you want the next serial number
CALL FUNCTION '/AIN/SSCC_GET_NEXT_NRRANGE'
EXPORTING
iv_prefix ,,= lv_company_prefix
iv_epc_type ,,= lv_epc_type
IMPORTING
ev_next_number = lv_next_number
et_ret_msg ,,= lt_ret_msg
EXCEPTIONS
no_number_range_avaiable = 1
number_range_locked ,,= 2
OTHERS ,,,,= 3.
IF sy-subrc <> 0.
,,MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
,, WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*****************************************************************************************************
Modify the above call as follows for the new interface:
DATA:
,,lv_next_number ,,TYPE /ain/epc_current ,
,,lv_epc_type ,,TYPE /ain/epc_type,
,,lv_company_prefix TYPE /ain/epc_prefix,
,,lt_ret_msg ,,TYPE bapirettab,
,,lt_comp ,,,,TYPE /ain/id_comp_tab,
,,ls_comp ,,,,TYPE /ain/id_comp_str,
,,lv_number_from ,,TYPE /ain/id_an_serial_no.
lv_epc_type = 'SSCC-96'.
lv_company_prefix = ' 0037000'.,,,,,,"a company prefix for which you want the next serial number
ls_comp-element = 'COMPANY_PREFIX'.
ls_comp-element_value = lv_company_prefix.
APPEND ls_comp TO lt_comp.
CALL FUNCTION '/AIN/SSCC_GET_NEXT_NRRANGE'
EXPORTING
iv_epc_type ,,= lv_epc_type
it_comp ,,= lt_comp
IMPORTING
ev_number_from = lv_number_from
et_ret_msg ,,= lt_ret_msg
EXCEPTIONS
no_number_range_available = 1
number_range_locked ,, = 2
OTHERS ,,,, = 3.
IF sy-subrc <> 0.
,,MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
,, WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
lv_next_number = lv_number_from.
Notes
Further information
Parameters
ET_RET_MSGEV_NUMBER_FROM
EV_NUMBER_TO
EV_SIZE
IT_COMP
IV_DEVGRP_GUID
IV_DOC_GUID
IV_EPC_TYPE
IV_SIZE
Exceptions
NO_NUMBER_RANGE_AVAILABLENUMBER_RANGE_LOCKED
Function Group
/SAPLSSCC_NRRANGEBAL Application Log Documentation BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 4022 Date: 20240328 Time: 223233 sap01-206 ( 50 ms )