Skip to Content
Technical Articles
Author's profile photo Mark Wagener

BSAO – ASN – Delivery & Transport Terms (SD | Supplier)

Missing customization possibility for transport information in ship notices (ASN)

If you are using the Ariba business suite add-on as a supplier and want to sent ASNs to your customers, you might have run into the following issues…

Buyers could specify in the “Customers Relationships” section if they allow suppliers to add delivery and transport information to ship notices. On the supplier side, it is not possible to disable the creation of these terms for a certain customer. They are created by default in CL_ARBERP_LIKP_SHIP_OUT method MAP_SHIP_HEADER.

In the cXML it looks like this:

This causes an error, when the ship notice is send to the AN:

400 Bad Request (Message no. ARBFND_FRW406)

# Error:Delivery terms information is not allowed. Please contact
support with the Error Reference Number:
ANERR-30000000000000001412622089 for more details#

To overcome this error, I used the outbound BAdI ARBERP_OUTBOUND_MAPPING. I implemented method if_arberp_badi_outb_map~map_likp_to_ship_out:

method if_arberp_badi_outb_map~map_likp_to_ship_out.
    data mo_likp_to_ship_out type ref to lcl_likp_to_ship_out.

    clear mo_likp_to_ship_out.

    if mo_likp_to_ship_out is initial.
      create object mo_likp_to_ship_out
          pi_object_key = iv_object_key.

        pie_cs_cxml = cs_dlv ).


The code for the local class which I used is:

class lcl_likp_to_ship_out definition.
 public section.
       importing pi_object_key type arbfnd_object_key,
        changing pie_cs_cxml type arberp_xship_s_cxml.

 private section.
	 m_object_key type arbfnd_object_key,
     m_ariba type zoq_ariba.

class lcl_likp_to_ship_out implementation.
  method constructor.
       clear m_object_key.
       clear m_ariba.

       m_object_key = pi_object_key.

       select single *
       from zoq_ariba
       inner join likp
        on zoq_ariba~kunnr = likp~kunag
       into corresponding fields of m_ariba
       where vbeln = m_object_key.

       if sy-subrc ne 0.
        "suitable error handling, e.g. issue a message!
  method ship_no_trans_no_delv_terms.
    if m_ariba-notransdelvterms = abap_true.
      clear pie_cs_cxml-request-ship_notice_request-ship_notice_header-terms_of_delivery.
      clear pie_cs_cxml-request-ship_notice_request-ship_notice_header-terms_of_transport.

I decided to create a central Ariba mapping and control table, which I also use to control other customer specific adjustments to the cXML.

Here an example for this context:

This provides the possibility to disable the creation of the transport and delivery terms for specific customers (buyers), who do not allow these terms.

If you have any questions, let me know in the comments!

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.