Johan van Zijl

Mostly SAP related…
  • rss
  • Home
  • About

Passing Custom Fields to Lean Order API

March 31, 2009

I recently started working on the ERP Sales Order functionality in the CRM 5.0 WebClient. This is essentially a WebClient view which uses the ERP 6.0 Lean Order API(LORD) to perform all sales order functionality directly in the backend. The benefit is no messy replication of CRM Sales Orders, Config, Pricing and Enhancements.

The problem is that as with all ERP systems customers enhance VA01 over time and the Lean API does not cater for all scenarios, such as additional fields appended to VBAK which must be filled by the user. (UPDATE – See Note 1078575 for restrictions)

The problem is that there seems no(to my knowledge) way to extend the structures of the API to carry these from CRM to ERP in any traditional(i.e. passing parameters) way.

Then this SDN thread prompted me to investigate the innovative implementation of the Lean Order API and I learned something new: Global variables in SAP Programs are externally accessible!

So all you need to do is create a Remote Function module like the one below in ERP.

FUNCTION ZZ_ERPORDER_TRANSFER_FIELD.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(IV_CONTACT_NAME) TYPE  ZZCONTACT DEFAULT 'My Abap Test'
*"----------------------------------------------------------------------

 field-symbols: <fs_vbak> type vbak.

 assign ('(SAPLSLS_LORD)VBAK') to <fs_vbak>.
 if sy-subrc = 0.
    <fs_vbak>-ZZCONTACT = IV_CONTACT_NAME.
 endif.

ENDFUNCTION.

The function module above accesses the global VBAK structure in Function Group SLS_LORD and updates it. This is riding rough shod over any concept of variable scope, so please think carefully before implementing this.

Now, all you need is to call the RFC Function Module from CRM. I used an implementation of BADI CRM_IC_ERP_BADI to accomplish this.

method IF_EX_CRM_IC_ERP_BADI~AFTER_CREATION.

call function 'ZZ_ERPORDER_TRANSFER_FIELD'
  destination cl_crm_erp_il=>gv_rfc
  EXPORTING
     IV_CONTACT_NAME = 'Contact Name'.

endmethod.
Share and Enjoy:
  • email
  • TwitThis
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • Technorati
Categories
ABAP Code, IC WebClient
Tags
ABAP Code, IC WebClient, Lean Order API, SLS_LORD
Comments rss
Comments rss
Trackback
Trackback

« A Code dump Useful notes for Variant Configuration »

2 responses

Hi Johan, thanks a lot for this code. but unfortunately in my

Antonio | March 3, 2011

Hi Johan,

thanks a lot for this code.
but unfortunately in my system this badi is not called from the standard.

i have implemented and activated the bady for populate a custom field on ECC side.
but he badi is not triggered and the field is not populate :(

Did you have any idea?
thanks a lot for your cooperation.

Antonio

Hi Antonio Apologies, for only coming here now. This code is

johanvz | April 14, 2011

Hi Antonio

Apologies, for only coming here now. This code is meant as workaround on the LORD1 interface and shouldn’t be used on LORD2(available with ECC6 EHP4). You must use Lord2 if its available. Also, the Badi you refer to was specific to version 5 if I recall and there are new badi’s available in CRM 7(think they are available in the IMG).

Regards

Johan.

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Navigation

  • ABAP Code
    • Business Partner
    • Conversion
    • CRM Service
    • IC WebClient
    • Middleware
  • Basis
  • Browsers
  • BSP
  • CRM
    • Interaction Centre
  • General
  • HTML
  • SAP
  • SAP CRM
    • Sales Documents

Search

Recent Posts

  • 15 Years of SMS and SAP CRM still does not support it
  • Vendors in the Sales Document
  • The Stapler Interface
  • SAP IT Service Management 7.0
  • Useful notes for Variant Configuration

RSS CONSNET

  • Forrester: Smaller SAP implementation partners sometimes the best option
  • Explore New Possibilities with our Experts at Saphila
  • Business Managers Enterprise Mobility Breakfast
  • New Positions Available!
  • First Global CRM 7.0 Solution live in South Africa
  • Shared Service Contact Centre
  • Consnet wins SAP Partner Excellence Award

Popular Posts

  • Sending mail from SAP
  • SAP CRM 7.0 Due
  • Browser Support and SAP CRM
  • SAP Salary Survey SA
  • Browser Support and SAP CRM - Part 2

Links

  • LinkedIn Profile
  • My Company – consnet.co.za

SAP

  • Getting Technical
  • martinceronio.net
  • SAP CRM Nightmare

Tech Related

  • WordPress Plugins

Categories

  • ABAP Code (12)
    • Business Partner (2)
    • Conversion (2)
    • CRM Service (1)
    • IC WebClient (5)
    • Middleware (1)
  • Basis (3)
  • Browsers (2)
  • BSP (2)
  • CRM (2)
    • Interaction Centre (1)
  • General (6)
  • HTML (3)
  • SAP (9)
  • SAP CRM (11)
    • Sales Documents (1)

Tags

Abap ABAP Code Authorizations BP Broadcast Browsers BSP Business Transaction Search Consulting CRM Customer digiata E-mail Firefox HTML Tidy IC WebClient IE6 IE7 IE8 Inbox ITS JAVA Mapping Opera Postfix Profile Parameters Salary Sales Area Sales Organization SAP SAP CRM SAP CRM 7.0 scot SMTP South Africa spam SSO2 Standards support package Tickets Web Client Web Dynpro website design Web Standards Wordpress

Archives

  • October 2009 (1)
  • August 2009 (1)
  • June 2009 (1)
  • May 2009 (2)
  • March 2009 (2)
  • November 2008 (1)
  • October 2008 (2)
  • September 2008 (7)
  • June 2008 (4)
  • May 2008 (4)
  • April 2008 (1)
  • January 2008 (2)
  • November 2007 (1)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox