BAPI_CUSTOMER_CHANGEFROMDATA1 handling in BSP

Hello Sir/Madam,
   How to get PI_SALESORG, 
              PI_DISTR_CHAN,
              PI_DIVISION
   dynamically, means according to the Customer No. I want to get.
  Thanking You,
Netaji.B
SE, Yash Technologies,
Hyderabad.
CALL FUNCTION 'BAPI_CUSTOMER_CHANGEFROMDATA1'
  EXPORTING
    PI_PERSONALDATA            =
    PI_PERSONALDATAX           =
  PI_OPT_PERSONALDATA        =
  PI_OPT_PERSONALDATAX       =
  PI_COMPANYDATA             =
  PI_COMPANYDATAX            =
  PI_OPT_COMPANYDATA         =
  PI_OPT_COMPANYDATAX        =
    PI_SALESORG                =
  PI_DISTR_CHAN              =
  PI_DIVISION                =
    CUSTOMERNO                 =
IMPORTING
  RETURN                     =

Hi Netaji,
You can check out the DB table KNVP which contains Customer Master Partner Functions. The fields VKORG,
VTWEG, SPART correspond to Sales Organization, Distribution Channel, Division respectively of a particular customer. So whenever the user enters Customer number and clicks the button, onInput processing Event handler before calling the BAPI, get those fields.
Hope this helps you.
Regards,
Ravikiran.C
Message was edited by: Ravikiran C

Similar Messages

  • Event Handling in BSP

    Hi guys,
    i need the framework of event handling in BSP. if have multiple controls on my BSP (with flow logic, how ican capture each event occured by each control.
    a- i have two radiobutton groups, each have two radiobuttons.
    b- i have a tableview, if user select a row i need the value of the selected row.
    c- i have a button, onclick i want to handle all the events, checked radiobuttons value, selected row to do a action or navigation.

    in the event click of the button (oninputprocessing)
    you can get the value of other objects (radiobutton, tableview etc,
    you have to do something like below.
    for tableview
    DATA: table           TYPE REF TO cl_htmlb_tableview .
    table ?= cl_htmlb_manager=>get_data( request = request
                                                name    = 'tableView'
                                                id      = 'TV1' ).
    for radiobuttons
    data: radiobuttongroup1 type ref to cl_htmlb_radiobuttongroup.
    data: radiobuttongroup2 type ref to cl_htmlb_radiobuttongroup.
    radiobuttongroup1 ?= cl_htmlb_manager=>get_data(
                            request      = runtime->server->request
                            name         = 'radioButtonGroup'
                            id           = 'RBG1' ).
    if radiobuttongroup1 is not initial.
      r1sel = radiobuttongroup1->selection.
    endif.
    radiobuttongroup2 ?= cl_htmlb_manager=>get_data(
                            request      = runtime->server->request
                            name         = 'radioButtonGroup'
                            id           = 'RBG2' ).
    if radiobuttongroup2 is not initial.
      r2sel = radiobuttongroup2->selection.
    endif.
    Hope this helps.
    Regards
    Raja

  • What's different between event handle by bsp frame & MAC

    Hi,
    Can anyone know the different between event handle by BSP frame & handle by MAC?
    and how to know which event is handle by BSP frame or MAC?
    thanks
    Gang

    Hi Abdul,
    So that means the add_entry event is standard event handle by BSP frame.
    thanks
    Gang

  • Button not triggering event handler in bsp

    Hi
    I hav e created button in bsp using htmlb component but it is not triggering onInputProcessing event handler
    in bsp when i click on button in webpage. Can any body pls provide me solution.
    Regards.
    Mukesh

    Hi Mukesh
    Please check if the following link works for you:
    http://help.sap.com/saphelp_nw70/helpdata/en/5d/64a0ed34c59e4c9754be5c0759c7c0/content.htm
    and
    http://help.sap.com/SAPHELP_NW70/helpdata/EN/60/1f1f056f057d4d962375efd3c92ed0/content.htm
    Regards
    Chen

  • Regarding session handling in BSP

    hi all,
        we have integrated our BSP application to EP 5.o, we have used 'existbspapplication'(used buffered page) function in our default page to handle the sessions.
       and its working fine, but now we have to integrate it to the  EP 6.0 and we find the sessions are not terminated, and tend to remain after closing the application manually.
       my question is does portal handle sessions if yes, tried the same(by removing session handling code from default page) but could not get the desired result. is there any other way to handle sessions in EP 6.0
      thanks,
      raju
    Message was edited by: krishnam raju

    Hi,
    Did you set the checkbox for portal integration on in the properties of the BSP page?
    Check also
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/132197c3564643af326a5ebccb604f/frameset.htm
    Furthermore, check things like
    /people/eddy.declercq/blog/2005/11/15/enemy-of-the-state
    /people/eddy.declercq/blog/2006/03/20/wake-me-up-before-you-go-go
    Eddy

  • BSP + Store a file in the pc of the user

    Hello,
    I have programmed a BSP, where a User gives his name in a field and the BSP search information in the database and <b>save the data in the pc of the User</b>.
    The problem is, that when <b>I try to save</b> the data in the pc of the user, I get <b>exceptions</b>. I have tried with:
    CALL METHOD cl_gui_frontend_services=>gui_upload
    and
    CALL FUNCTION 'WS_DOWNLOAD'
    When I save the information in the AppServer, then, I don't have any problem (OPEN DATASET i_path FOR OUTPUT ...).
    <b>Is it possible to save the data in the pc of the user using BSPs?</b> Or should I programm such functionality in javascript?
    Thank you very much
    Markus

    HI
    In BSP you cannot use CL_GUI_FRONTEND_CLASS, This class can be used while working in SAP using GUI. Within the clas its checks for GUiID, which is not there while working with BSP.
    For File handling in BSP you have to make use of Class <b>CL_HTTP_RESPONSE</b>
    Refer to these links for Code of the same:
    Generate file .doc or .pdf as from a text
    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    Cheers,
    Vijay Raheja

  • Calling a R3 transaction in BSP

    Hi,
      I want to call an R3 Transaction and pass the screen parameter inside an BSP Page and i am working in WAS620. Is this possible?
      If yes, How the CALL TRANSACTION command i handled in BSP?
      Is there any other way to call an SAP transaction like VA02 etc?
    Thanks in advance
    arun

    Although I'm not sure you can get the same level of parameter passing as with the regular SAPGui shortcut files, you might also want to have a look a the Java SAPGui.  It can be opened as an applet in a web browser.  The following is some sample code from a BSP. I even store the installation in the Mime repository.  This example uses SNC for Single Sign On and takes you directly to SE80.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <HTML>
    <HEAD>
      <TITLE>SAPGUI for the Java Environment</TITLE>
      <STYLE type="text/css">
          body { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; }
      </STYLE>
    </HEAD>
    <BODY scroll="no">
    <SCRIPT language="JavaScript">
    // user configurable part starts here
    var pluginurl         = '';
    var scriptable     = 'true';
    var codebase         = '.';
    var jnlp           = 'platin.jnlp';
    var keepalive      = 'true';
    var frog           = 'true';
    var trace          = '';
    var tracefile      = '';
    var connectionData = 'conn=/M/nts163/S/3620/G/SPACE/&tran=SE80&clnt=088&fast=true&sncon=true&sncname=p:[email protected]&sncqop=9';
    // user configurable part ends here
    // verify if Java Plugin as control in Internet Explorer or Java Plugin for Netscape or native JRE of browser must be used
    var jre = 'control';
    if(navigator.platform.indexOf("Mac") > -1)
       jre = 'native';
    else if (navigator.appName.indexOf("Netscape") != -1)
       jre = 'plugin';
    document.open();
    switch (jre)
    case 'control':
        document.writeln('<OBJECT CLASSID  = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"                               ');
        document.writeln('    ID       = "PlatinGUI"                                                                    ');
        document.writeln('    CODEBASE = "j2re-1_3_1_02-win-i.exe#Version=1,3,1,0"                             ');
        document.writeln('    WIDTH    = "100%"                                                 ');
        document.writeln('    HEIGHT   = "100%"                                                 ');
        document.writeln('    BORDER   = 0>                                                      ');
        document.writeln('<PARAM NAME = "TYPE"           VALUE = "application/x-java-applet;jpi-version=1.3.1">         ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable,'">                                ');
        document.writeln('<PARAM NAME = "code"           VALUE = "com.sap.platin.GuiApplet2">                   ');
        document.writeln('<PARAM NAME = "codebase"       VALUE = "', codebase,'">                             ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp,'">                             ');
        document.writeln('<PARAM NAME = "archive"        VALUE = "GuiStartS.jar">                             ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive,'">                             ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog,'">                             ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace,'">                             ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile,'">        ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData,'">                               ');
        document.writeln('                                                                ');
        document.writeln('This page requires a Sun Java Plugin 1.3 and a SAPGUI for Java to view.                      ');
        document.writeln('                                                                ');
        document.writeln('</OBJECT>                                                           ');
        break;
    case 'plugin':
        document.writeln('<EMBED TYPE        = "application/x-java-applet;version=1.3"                         ');
        document.writeln('    PLUGINURL      = "', pluginurl,'"                                          ');     
        document.writeln('    WIDTH          = "100%"                                            ');                                        
        document.writeln('    HEIGHT         = "100%"                                             ');
        document.writeln('    ALIGN          = "BASELINE"                                                ');
        document.writeln('    code           = "com.sap.platin.GuiApplet2"                                      ');
        document.writeln('    codebase       = "', codebase,'"                                        ');
        document.writeln('    jnlp           = "', jnlp,'"                                                ');
        document.writeln('    archive        = "GuiStartS.jar"                                       ');
        document.writeln('    keepalive      = "', keepalive,'"                                       ');
        document.writeln('    frog           = "', frog,'"                                            ');
        document.writeln('    trace          = "', trace,'"                                            ');
        document.writeln('    tracefile      = "', tracefile,'"                                       ');
        document.writeln('    connectionData = "', connectionData,'"                                        ');
        document.writeln(' <NOEMBED>                                                      ');
        document.writeln(' </NOEMBED>                                                      ');
        document.writeln(' </EMBED>                                                              ');
        break;
    case 'native':
        document.writeln('<APPLET CODEBASE  = "', codebase,'"                                                           ');
        document.writeln('        ARCHIVE   = "GuiStartS.jar"                                                           ');
        document.writeln('        CODE      = "com.sap.platin.GuiApplet2"                                               ');
        document.writeln('        WIDTH     = "100%"                                                                    ');
        document.writeln('        HEIGHT    = "100%">                                                                   ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable, '">                                    ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp, '">                                          ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive, '">                                     ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog, '">                                          ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace, '">                                         ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile, '">                                     ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData, '">                                ');
        document.writeln('</APPLET>                                                                                ');
        break;
    document.close();
    </SCRIPT>
    </BODY>
    </HTML>

  • Disable URL-Mangling in BSP Runtime

    Hi Experts,
    we decided to provide some web applications für mobile devices. Currently (and maybe never) WD ABAP does not support mobile devices. Therefore we are looking for alternatives.
    There are a lot of threads in the net where other people discussed the same topic and several decided to use BSP. We wanted to use BSP and jQueryMobile but we noticed that there are some problems because of URL-Mangling / rewriting.
    Do you have any idea if it is possible to disable URL-Mangling without modification? We already thought about an own request handler in TA SICF but in this case we also need an own CL_BSP_RUNTIME (to disable the coding in method on_check_rewrite). However this is difficult because some standard BSP runtime classes (RUNTIME, NAVIGATION...) are marked as final, so it isn't possible to inherit from them and we don't want to copy / redevelop all relevant classes.
    Furthermore there are other disadvantages like:
    - many redirects (problematical with low-bandwidth connections)
    - client cookie handling is more difficult
    Do you have any idea?
    Kind regards
    Danny

    Hello!
    I've done quite a lot of BSP development together with and without javascript frameworks like jQuery. It's possible to create a scenario without URL mangling if you set the system architecture in a specific way. I could speak a lot about this setup as it works really well! Here is a quick guide to get started:
    Step 1:
    The BSP runtime isn't really used at all. Create a BSP application but only store MIME objects in it. The MIME objects isn't URL mangled! The drawback is of course you can't do server side ABAP in your HTML documents. On the positive side, any Web Developer can create the HTML and javascript without ABAP programming skills. SAP functions as a static web server with all the benefits of the ICM cache and transport system.
    Step 2:
    Add an external alias in SICF for the BSP application. Like pointing "/myapp" to "/sap/bsp/sap/zmyapp_v001". The external alias is configured with a service account (without any authorizations) with authentication set to "Required with Logon Data". All fields should be specified (Client, User and Language). Now, any anonymous user can request the HTML files without interfering with logon data.
    You don't need an external alias, but they come in handy to have nice-looking URLs; the possibility to change their target when you have multiple versions at the same time; and you can create multiple alias for the same application with different logon data. Like "/myapp/english" if you want. Or "/myapp/client800". Or "/myapp/latest", "/myapp/version1" etc.
    Step 3:
    Create a custom HTTP handler for your business data and assign it to a node in SICF. For example "/customers/orders/get" or whatever you find appropriate for your app. Since you now have your own handler, the BSP runtime isn't involved and no URL mangling exists.
    The handler returns data in a suitable format for Web Developers (read: JSON).
    Protect this node with security that matches the flexibility required from the frontend. I usually set another service account for this service and handle authorization myself; returning HTTP status codes like 403, 200 to the Web Developer (but not 401 as it's quite difficult to handle in AJAX scenarios). In it's most simple form you can provide username and password as form fields and perform a user switch in the handler for every request, effectively changing SY-UNAME in the handler ensuring that the correct user context is used.
    Best regards,
    Mikael Gurenius
    SAP Solution Architect (Mobility)
    PS: MIME objects are of course served with URL Mangling if referenced relative to the BSP application. You can avoid this (for example for the Apple icons) by always linking your MIME objects from the root. Get the application path using code or type manually. Like
      <link rel="apple-touch-icon-precomposed"
    sizes="57x57"
    href="<%= lv_path %>/icon_57x57.png" /> where lv_path is "/myapp/images" or "/sap/bc/bsp/myapp/images". If you do this, you can have URL Mangling (and do ABAP development) in your BSP pages but still have "clean" URLs for MIME objects.

  • Docu on Delta Handling?

    I really like the concept of Delta Handling in BSP Applications, because it avoids the usual "flickering" of the whole page if you only work in one special section of the page.
    I tried to look for documentation on this but I couldn't really find any. Can anybody provide a link or something.
    I tried to switch on Delta Handling (setting the flag in the controller and adding Delta Handler Blocks) but it seems that it is not activated (how can I tell anyway? Only from the page's source code?).
    Best regards,
    Daniel

    Delta Handling is a fickle beast.  Even within the BSP support team at SAP it is supported on a "Best Effort" basis.  That means that if you can't get it to work in your application, their best advice is to turn it off. 
    I have gotten DH to work in some of my applications.  Sometimes it provides a nice effect and a good performance boost - other times it completly screws things up. 
    The best information I can give you is - you application must be stateful.  DH only works in IE.  Also you must set the DH flag on the properties of the View and the Controller - from the highest level controller on down. 
    I'm afraid you won't find much detailed documentation on DH. To know if it is turned on, you usually can peak at the generated source code on the client.  DH source will look VERY different.

  • How to solve this case sensitive problem for the parameters in function?

    Hi,
       I have a function, which should receive one parameter comes from textbox in BSP form. User will input upper case or lower case characters together in this textbox. But when I debug function, I found after function recevice the value from BSP form, the string value was converted into upper case automatically.
       I don't want system convert string to upper or lower case. I want keep the original value that user inputted.
       So is it possible to do this?
       Thanks!

    Hi,
       Thanks for your reply.
       Yes, I use the inputfield. The problem is if I use the parameter which contain user's input in the event handler of BSP, the value is equal to the user's input. But if the parameter was transfered into function, the value was converted to uppercase.
       But I want to keep  the original value.
       Thanks!

  • E-Recruitment/E-Recruiting in the Portal

    Hi Experts,
    We are implementing SAP E-Recruitment and the SAP Portal.  After following the IMG config steps, I am curious how the webdynpro pages appear in the portal.  I can test the pages from SICF, but how do I complete the portal integration and get the pages to open from a tab within the portal?
    Also, are any BSP pages still supported within E-recruiting?  Or are all the pages webdynpro?
    Thanks
    Shane

    Dear Shane,
    SAP e-Recruitment business package is split into two ui packages. One is on Web Dynpro ABAP and the other BSP technology. As a functionality all the candidate related pages like, internal/external/registered candidate related activities are developed in WD ABAP. All the recruiter, manager and administrator(upload questionaire etc) are handled in BSP technology.
    As a background check(based on information), the busienss package was completly in BSP and later candidate related pages were moved to WD ABAP.
    So finally, the business package is collaboration of BSP and WD ABAP UI technologies and BSP is very much part of it.
    Thank you.
    Regards,
    Sharath M G

  • Switching off BSP delta handle.

    Hello All,
      I want to switch of the <b>delta handler</b> for a BSP page. I have been told that there are 2 delta handlers. One on the server side and another on the client side as a JavaScript optimizer.
      Please suggest on how I can switch off the functionality for a particular page.
      At the moment I have a page where the unchanged data doesn't flow back to the server because of the delta handler.  This results in incorrect posting of data.
    The effort for persisting the values on the server side is very high and hence I would prefer to switch off the delta handler.
    Thanks and regards,
    Murli Rao

    Hello Gregor,
      This javascript has to be added in the view in which you want to disable client side delta handling.
      This is not a modification to standard. I had a Z view in which I wanted to switch of client side delta handling.
      If you want to do that for a standard view then there are two options.
    1. Do a modification to standard.
    2. Do a controller replacement and when you copy the
        view into your own package then you can add the
        javascript.
    I hope I have answered your question satisfactorily. If you still have any doubts please feel free to post a new question.
    Thanks and regards,
    Murli Rao

  • Handling events in BSP application using WML tag Extensions

    Hello Everyone  ,
                            We are developing a BSP applications for Mobile handheld using WML tag library. I am looking for some code samples to know how we can handle evevents inside the BSP using the WML tag library.
    Can any one of  you plesae help us by placing a code snippet for handling onInputprocessing() methods (BSP Using WML Tag extensions).
    I mean to ask how we can handle events inside the BSP applications that uses the WML tag library.
    I know about how to handle BSP events using HTMLB and XHTMLB tags frameworks.
    Thanks for your help in advance.
    Thanks,
    Greetson

    Is this WML tag library something that is supplied by SAP u2013 as a BSP Extension Element?  Or are you just using WML tags directly in your layout?  I can tell you in general that if you want to generate HTMLB events from regular HTML code you can generate the JavaScript calls using the htmlbEvent tag of the BSP extension library.  However your tags have to be running within an HTMLB Content tag for this to work.
    If you want to work totally without HTMLB then you need to use the simple HTTP Post but format the input name as OnInputProcessing(<function code>) like this:
    <input type="submit" name="OnInputProcessing(ok)" value="OK">
    This will cause the OnInputProcessing event handler to trigger without needing any HTMLB tags (this is how it was done in WebAS 6.10 before we BSP Extensions).

  • Cookie handling & navigation across multiple BSP applications

    Hi All,
    This is my scenario...
    I have a main BSP application (say YYYY) which is the user login application.  The application class is ZCL_YYYY.  This application will enable the users to login.  This application will show up the list of other applications say (application AAA - class ZCL_AAA, appln BBB-class ZCL_BBB,  etc).  User can click on the application and navigate. 
    I am storing the password in server side cookie and during navigation to other application from my main application I am passing the user id in the URL (like http://....htm&user=mmmm).  The other application will validate the user id against the server side cookie and then proceeds further.  
    I tried using client side cookie but it is working only with in single application but not across applications (I used response->set_cookie in initialization event of main bsp appln and request->get_cookie in the called application in request event). 
    Is there a better way in handling this navigation??.
    My issue is sometimes(very rare cases but still an issue) when the traffic is more, one user is gets the other user's screen, that is when two users click application AAA at the same time, both the users are getting the same information (which is different for different users). 
    Kindly suggest.
    Thanks,
    Krish

    Thanks Raja & Raja...
    In my scenario, the user logging in is the customer (KNA1-KUNNR).  All the BSP application are going to come in with the same SAP user id which is set in SICF.  For SAP transaction user id is going to be SAP-WEB user. 
    The user logs in with the customer number as user id (we have web users for KNA1 created using SU05).  The first will be the login screen where the customer enters his number and password.  The user id and pwd is validated and then the list of applications page will get displayed (as far as SAP is concerned, the transaction is going to come in with SAP-WEB user id).  Once the application is clicked, the password is stored in server side cookie like.. (since SAP user id is going to be same across it was passed as NONE)
      call method cl_bsp_server_side_cookie=>set_server_cookie
        exporting
          name                  = v_customer
          application_name      = 'NONE'
          application_namespace = 'NONE'
          username              = 'NONE'
          session_id            = 'NONE'
          data_value            = v_pwd
          data_name             = 'NONE'
          expiry_time_rel       = 300.
    In the called application, the cookie is retrieved (it should be with in 5 minutes) and validated again with customer id from the URL.  If there is an issue in validation, navigation will go to login page again.
    Thanks,
    Krish

  • Handling HTMLB events in BSPs???

    Hi all,
    can anybody tell me the how to handel events in BSPs??

    Hi Aravind,
    Follow the link  /people/brian.mckellar/blog/2004/07/28/bsp-programming-handling-htmlb-events u can understand.

Maybe you are looking for

  • The Database Link is not active

    try to be more clear, i'm in lack of ideas in this problem. I am following guide Oracle Database 2 Day + Data Replication and Integration Guide. I defined global_names parameter of remote database as true.In the step of "creation database link" i am

  • Report painter and sql query

    I suppose we ABAPers can make use of sql query that is sq01 sq02 and sq03 and report painter pls can u provide me the links for that i am new to them thank you

  • Split jms messages ?

    Hi, Can anybody please advice as to how to split the messages while receiving in a jms queue ? I have a receiver jms communication channel and I need to split the messages so that in the outpout we should get 50 records per message. Also, each messag

  • I have LR 4.1 installed and need CR 6.7 to edit in PS CS5.  Is it available?

    All links to CR 6.7 download that I can find point to PS CS6.

  • Non-Unicode Support Post NetWeaver 2004s

    Hi everyone, Our site runs an existing non-unicode environment, and are aware that we can definetly upgrade our existing environments to NetWeaver 2004s (Basis 7.0). However will SAP provide future upgrade kits for later releases of SAP (eg Basis 8.x