Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Problem Description - It is not possible to print UPS maxicode using SAP Adobe forms. UPS maxicode string expects some control characters - GS, RS and EOT. Reason behind it is ADS (Adobe Document Service) cannot render these control characters. So whenever we try to pass a maxicode string containing these control characters, ADS throws rendering error.

 

Alternative Solution -

If we try to send the data from SAP, ADS cannot render it. The best alternative to this create the UPS string using scripting at server side.

data.#subform[0].IM_FLD09::initialize - (FormCalc, server)

var gs = "\u001D"

var rs = "\u001E"

var eot = "\u0004"

$.rawValue = concat(

            "[)>" ,

            rs ,

            "01" ,

            gs ,

            "96" ,

            data.#subform[0].MAXI_ZIP.rawValue ,

            gs ,

            data.#subform[0].MAXI_COUNTRY.rawValue ,

            gs ,

            data.#subform[0].MAXI_SERVICE.rawValue ,

            gs ,

            "1Z" ,

            data.#subform[0].MAXI_TRACK.rawValue ,

            gs ,

            "UPSN" ,

            gs ,

            data.#subform[0].MAXI_CARACC.rawValue ,

            gs ,

            data.#subform[0].MAXI_JULDT.rawValue ,

            gs ,

            gs ,

            "1/1" ,

            gs ,

            data.#subform[0].MAXI_WEIGHT.rawValue ,

            gs ,

            "N" ,

            gs ,

            gs ,

            data.#subform[0].MAXI_CITY.rawValue ,

            gs ,

            rs ,

            eot )

Different printers encodes the maxicode value in different way.

For zebra printer, the format is -

data.#subform[0].IM_FLD09::initialize - (FormCalc, server)

var gs = "\u001D"

var rs = "\u001E"

var eot = "\u0004"

$.rawValue = concat(

            data.#subform[0].MAXI_SERVICE.rawValue ,

            data.#subform[0].MAXI_COUNTRY.rawValue ,

            data.#subform[0].MAXI_ZIP.rawValue ,

            "[)>" ,

            rs ,

            "01" ,

            gs ,

            "96" ,

            "1Z" ,

            data.#subform[0].MAXI_TRACK.rawValue ,

            gs ,

            "UPSN" ,

            gs ,

            data.#subform[0].MAXI_CARACC.rawValue ,

            gs ,

            data.#subform[0].MAXI_JULDT.rawValue ,

            gs ,

            gs ,

            "1/1" ,

            gs ,

            data.#subform[0].MAXI_WEIGHT.rawValue ,

            gs ,

            "N" ,

            gs ,

            gs ,

            data.#subform[0].MAXI_CITY.rawValue ,

            gs ,

            rs ,

            eot )

3 Comments

  1. This works really fine. Was looking for a solution like that for years.

  2. Former Member

     

    Hi,

    I am trying this solution but maxicode is not accepting more than 90 characters. Can you help me here.

    I am using the UPS Maxicode Barcode object for this. Is this right?

    Thanks,

    Gayathri

     

  3. Hello Gayathri,

    I am not sure if you were able to find some solution already for this problem.

    You are using the right barcode object. maxicode length is 90 char maximum by default. Check the xml source.

    Here is some xml code from my adobe form.

    <barcode dataLength="90" type="upsMaxicode" upsMode="internationalCarrier" wideNarrowRatio="fixed"/>

    You can play with these parameters. I think here if you change the value of dataLength, you will be able to fix the problem.

    Let me know if this helps.

    Regards,

    Richa