Skip to Content
avatar image
Former Member

how to use NRO object in multimapping message split

Hi guruz

my requirement is that i am sending incoming B2B IDOCs data to an RFC as well as a file using multimapping

I made an NRO using

http://: /webdynpro/dispatcher/sap.com/nro~maintenance/NROMaintenance.

and mapping it in

message1 rfc data as well

message 2 file

i want same NRO to be passed to both but it is taking next number to message2 file.

is there anyway that we can pass same value to both ??

i saw this blog but couldn't get any help https://blogs.sap.com/2016/09/01/use-case-nro-api-access-dynamic-counter-variable/

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Jun 22, 2017 at 12:59 PM

    Naina,

    You can access NRO in mapping via UDF and you can map the outcome of this UDF to both the messages.

    https://answers.sap.com/questions/180346/b2b-add-on-nronumber-range-object-usage-in-file-na.html?childToView=181715#answer-181715

    Br,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 22, 2017 at 11:09 AM

    Hi Naina,

    I assume that you added the constant $B2B_UEBNR<nroName>$B2B_END_UEBNR to both messages and that's why the NRO increased for both message 2. You can also get the last number again by using the constant $B2B_UEBNR_BEFORE<nroName>$B2B_END_UEBNR in case of message 2 file.

    Best regards,

    Mate

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 22, 2017 at 12:52 PM

    Hi Naina,

    In a multimapping you are generating two or more messages, therefore to have the same NRO number, it doesn't seem to be right. I think you should think about the possibility to generate this number earlier.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Iñaki

      yes i think you are right.

      can you please check my reply below and let me know if there is smth that you can think of.

  • Jun 26, 2017 at 07:59 AM

    Hello Naina,

    Did u run it end-end and check?.

    Are you getting the logs in channel that NRO is called?

    AFAIK RFC gets executed faster that IDOC, so you might need to delay the mapping of RFC using UDF.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 22, 2017 at 02:57 PM

    you can even create 2 NRO Numbers with same start and other values.

    In the mapping you can append the constant value and increment it

    $B2B_UEBNR<nroName_1>$B2B_END_UEBNR For first map call

    $B2B_UEBNR<nroName_2>$B2B_END_UEBNR For second map call

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 22, 2017 at 04:10 PM

    let me explain my receiver structure and requirements thoroughly

    <messages>
          <message1> cardinality 0.....unbounded
             field1 (NRO)
             field2
                   field21(NRO)
          </message1>
          <message2> cardinality 1 
             field3
                  field31(NRO)
          </message2>
    </messages>
    
    

    when mapping is executed i want the same NRO number to be assigned to field1, field21(child of field2 message1) and field31(child of field3 message2).is this somehow possible.

    i thought of using variable in reciver maping assigning NRO to that and later on using the variable everywhere. 
    but this NRO is not getting assigned to the variable and its passing same string "$B2B_UEBNR<nroName_2>$B2B_END_UEBNR" to  the variable.
    can i write the udf to read NRO and pass it variable as a value and then assign variable to fields.
    
    
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 22, 2017 at 04:14 PM

    one more issue that is happening

    message1 is idoc

    message2 is rfc

    i have maintained order at runtime in ICO and still is executing RFC first and IDOC second.

    Add comment
    10|10000 characters needed characters exceeded