Skip to Content
avatar image
Former Member

Data import with file convertor and internal number assignment

Hi,

We are using an implementation of the file convertor BAdI and data import framework to import materials from a CSV file, triggering a multi-record CR (MATPUR) for user processing.

DTIMPORT requires that a material number is specified on the inbound - as per standard IDoc processing - so we provide a dummy material number in the file (for material types with internal numbering configured).

During CR processing the dummy material number is cleared by the user and the MDG-AF then re-assigns temp keys for records in the CR.

My question is, in the case of importing material from CSV to a multi-record CR, how to automate the clearing of the dummy material numbers in the UI so internal numbering will work as expected?

Regards

Con

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 28, 2017 at 08:07 PM

    Hi, https://archive.sap.com/documents/docs/DOC-30192 (chapter 5.10.4) describes how to change the MATNR in the single-object maintenance. If you use that code to clear the MATNR resp. to reset it to the temporary ID.

    Just a braindump, have never tried whether clearing the MATNR works - only that changing the MATNR according to the mentioned guide works.

    Regards, Ingo

    P.S.: Assuming that your material type only supports internal numbering, you'd anywayget an error message if the MATNR is filled when trying to activate.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 06, 2017 at 04:20 AM

    Hi, Is there a recommended class and method to manipulate MATNR in the case of multi-record UI, feeder class CL_USMD_MC_FEEDER_LIST?

    In the mentioned guide (for single object UI feeder the class) the method BEFORE_FLUSH is available. However same method is not defined in case of multi-records UI feeder class

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06, 2017 at 07:25 PM

    Hi, I'm not aware of any guide on this.

    If you want to research on this, you could search for some point in time in the feeder class CL_USMD_MC_FEEDER_LIST (e.g. the change to the Edit mode). The governance API's method for key change is

    CL_USMD_MC_CONV_GOV_API ->IF_USMD_CONV_SOM_GOV_ENTITY~EXCHANGE_ENTITY_KEY.

    You could use CL_USMD_APP_CONTEXT to store the information that the derivation already took place.

    Good luck, Ingo Bruß

    P.S.: Wouldn't it be easier to provide the correct MATNRs already in the DIF import file?

    Add comment
    10|10000 characters needed characters exceeded