SAP ABAP IMG Activity OIUREP_MMS_2014_BADI (MMS Document ID Business Add-In)
Hierarchy
IS-OIL (Software Component) IS-OIL
   IS-OIL-PRA-REP-ROY (Application Component) Royalty Reporting
     OIU_REP (Package) Production, Tax & Royalty Reporting
IMG Activity
ID OIUREP_MMS_2014_BADI MMS Document ID Business Add-In  
Transaction Code S_SOG_81000124   IMG activity: OIUREP_MMS_2014_BADI 
Created on 20030107    
Customizing Attributes OIUREP_MMS_2014_BADI   MMS Document ID Business Add-In 
Customizing Activity OIUREP_MMS_2014_BADI   MMS Document ID Business Add-In 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name OIUREP_MMS_2014_BADI    

In this IMG activity, you implement/activate your business add-in for customizing your company's desired MMS document ID convention, if other than the standard SAP PRA convention. This business add-in allows your company to define the reported MMS document ID to its own requirements.

SAP recommends that you read all the documentation contained here for full details of implementing this business add-in in conjuction with other existing MMS document ID configuration entires.

Example

METHOD if_ex_oiurep_2014_doc_id~create_document_id.

DATA: w_date_slash(10) TYPE c, "date with slashes for FM

w_julian_date(7) TYPE n VALUE 0, "holds julian date for docid

w_ret_code(2) TYPE c, "FM return codes

w_fed_doc_ext(2) TYPE n, "fed docid begins at 81

c_federal TYPE oiurep_mrt_pend-fed_indian_cd VALUE 'F'.

IMPORT w_fed_doc_ext = w_fed_doc_ext FROM MEMORY ID 'fed_doc_ext'.

IF w_fed_doc_ext < '80'.

w_fed_doc_ext = 80.

ENDIF.

*Use sales month/year and current run day

CONCATENATE i_oiurep_mrt_pend-sales_year '-'

i_oiurep_mrt_pend-sales_month '-'

sy-datum+6(2)

INTO w_date_slash.

* Get last day of sales month

CALL FUNCTION 'OIUH_PWGETLASTDAY'

CHANGING

date = w_date_slash

rdate = w_date_slash

rcode = w_ret_code

EXCEPTIONS

goback = 1

failed = 2

warning = 3

OTHERS = 4.

IF sy-subrc <> 1. "GOBACK is sy-subrc=0

MESSAGE e335(oiurep_mms_2014) RAISING called_function_error.

ENDIF.

* use current date for 5 digit julian date

CALL FUNCTION 'OIUH_PWTOJULIANDT'

CHANGING

date = w_date_slash

rdate = w_julian_date

rcode = w_ret_code

EXCEPTIONS

goback = 1

failed = 2

warning = 3

OTHERS = 4.

IF sy-subrc <> 1. "GOBACK is sy-subrc=0

MESSAGE e335(oiurep_mms_2014) RAISING called_function_error.

ENDIF.

IF i_oiurep_mrt_pend-fed_indian_cd = c_federal. "F

w_fed_doc_ext = w_fed_doc_ext + 1.

CONCATENATE i_oiurep_mrt_pend-bukrs+1(2)

w_julian_date+2(4)

w_fed_doc_ext

INTO e_doc_id.

ELSE.

CONCATENATE i_oiurep_mrt_pend-bukrs+1(2)

w_julian_date+2(4)

i_oiurep_mrt_pend-indian_tribe_no

INTO e_doc_id.

ENDIF.

IF e_doc_id IS INITIAL.

MESSAGE e335(oiurep_mms_2014) RAISING doc_id_creation_error.

ENDIF.

EXPORT w_fed_doc_ext = w_fed_doc_ext TO MEMORY ID 'fed_doc_ext'.

ENDMETHOD.

Requirements

If you implement/activate this business add-in, you should no longer specify an internal number range 'MMS-2014: Document ID - Internal Process Numbering' within IMG activity 'Maintain Number Range Intervals for MMS-2014 Processing'. The internal number range is no longer needed, since this business add-in will eliminate the need for SAP PRA standard delivered code to generate a MMS document ID using the number range. By eliminating the internal processing range, you may chose to expand your external number range, 'MMS-2014: Document ID - External History Load Numbering', to allow for a greater MMS document ID range when loading MMS-2014 reported history.

Standard settings

Recommendation

Activities

Further notes

Business Attributes
ASAP Roadmap ID 899   not to be assigned 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency I   Valid for countries specified 
Customizing Attributes Country Key Country Name
OIUREP_MMS_2014_BADI US USA
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG OIUREP_MMS_2014_BADI 0 I400001074 Royalty Reporting 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20030107 
SAP Release Created in 46C