Problem  while creating  contact person using SD_CUSTOMER_MAINTAIN_ALL

Hi All,
I am trying to create a contact person to a customer using FM SD_CUSTOMER_MAINTAIN_ALL.Following is the simple code that I am using.FM is not giving any exception.But the contact person is not getting created.can anyone help me regarding this.
DATA: I_FKNVK TYPE TABLE OF FKNVK,
      wa      type FKNVK.
MOVE '0009011357' to wa-kunnr.
MOVE 'Bose' TO wa-namev.
MOVE 'Lalit' TO wa-name1.
MOVE  '9980055557'   to wa-TELF1.
*MOVE 'City' TO wa-ort01.
*MOVE 'DE' TO wa-parla.
*MOVE '' to watelf1.
*MOVE 'U' to wa-kz.
APPEND wa to I_FKNVK.
CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
EXPORTING
  I_KNA1                              =
  I_KNB1                              =
  I_KNVV                              =
  I_BAPIADDR1                         =
  I_BAPIADDR2                         =
  I_MAINTAIN_ADDRESS_BY_KNA1          = ' '
  I_KNB1_REFERENCE                    = ' '
  I_FORCE_EXTERNAL_NUMBER_RANGE       = ' '
  I_NO_BANK_MASTER_UPDATE             = ' '
  I_CUSTOMER_IS_CONSUMER              = ' '
  I_RAISE_NO_BTE                      = ' '
    PI_POSTFLAG                         = 'X'
  PI_CAM_CHANGED                      = ' '
  PI_ADD_ON_DATA                      =
  I_FROM_CUSTOMERMASTER               = ' '
IMPORTING
  E_KUNNR                             =
  O_KNA1                              =
  E_SD_CUST_1321_DONE                 =
TABLES
  T_XKNAS                             =
  T_XKNBK                             =
  T_XKNB5                             =
  T_XKNEX                             =
  T_XKNVA                             =
  T_XKNVD                             =
  T_XKNVI                             =
    T_XKNVK                             = I_FKNVK
  T_XKNVL                             =
  T_XKNVP                             =
  T_XKNZA                             =
  T_YKNAS                             =
  T_YKNBK                             =
  T_YKNB5                             =
  T_YKNEX                             =
  T_YKNVA                             =
  T_YKNVD                             =
  T_YKNVI                             =
  T_YKNVK                             =
  T_YKNVL                             =
  T_YKNVP                             =
  T_YKNZA                             =
  T_UPD_TXT                           =
EXCEPTIONS
   CLIENT_ERROR                        = 1
   KNA1_INCOMPLETE                     = 2
   KNB1_INCOMPLETE                     = 3
   KNB5_INCOMPLETE                     = 4
   KNVV_INCOMPLETE                     = 5
   KUNNR_NOT_UNIQUE                    = 6
   SALES_AREA_NOT_UNIQUE               = 7
   SALES_AREA_NOT_VALID                = 8
   INSERT_UPDATE_CONFLICT              = 9
   NUMBER_ASSIGNMENT_ERROR             = 10
   NUMBER_NOT_IN_RANGE                 = 11
   NUMBER_RANGE_NOT_EXTERN             = 12
   NUMBER_RANGE_NOT_INTERN             = 13
   ACCOUNT_GROUP_NOT_VALID             = 14
   PARNR_INVALID                       = 15
   BANK_ADDRESS_INVALID                = 16
   TAX_DATA_NOT_VALID                  = 17
   NO_AUTHORITY                        = 18
   COMPANY_CODE_NOT_UNIQUE             = 19
   DUNNING_DATA_NOT_VALID              = 20
   KNB1_REFERENCE_INVALID              = 21
   CAM_ERROR                           = 22
   OTHERS                              = 23
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    WAIT          = 'X'
IMPORTING
   RETURN        =
ENDIF.

i see this so much on this site, users just posting solved and not giving details on how they fixed the problem, the SDN is meant to be for sharing!!
If you find a fix, share it or don't bother being a part of the SDN community.(so annoying)

Similar Messages

  • Error while creating contact person

    Hi While creating contact person in customer master data
    I am getting the message Partner XXXXXX is not assigned to a partner function?
    What might be the possible reason,
    Thanks in advance
    Regards
    Jai

    Hi jaigss,
    Please check the below threads,
    Getting a "Business partner not found with partner function type requester"://Re: Partner function not found
    Approver Can replaced by Requestor..
    Thanks,
    Swamy H P

  • Problem while creating WBS elements using LSMW

    Hello experts,
    I am able to create Project Definitions using LSMW. (using recording)
    But there is a problem while creating WBS elements.
    Tcode CJ20 has table control and that will become problem for multiple rows (levels).
    Can anyone suggest a solution to mass upload WBS elements?
    Thanks for your valuable advice.

    Hi,
    Instead of using "BAPI_PROJECT_MAINTAIN", use following solution. We are using this solution and it is working pretty good.
    If the WBS element is already created and you want to create one more with same data, first get the WBS related information using BAPI_PROJECT_GETINFO as you are doing currently.
    I am using different sets of BAPIs to create project, create / change WBS element.
    I use function module from Function group CJ2001 ( Project related BAPIs ), CJ2054 ( WBS related BAPIs ) and PS_BAPI ( pre/post processing BAPIs ). There are specific order in which you need to execute these BAPIs.
    For example if you want to create / change the WBS element, the BAPIs sequence is:
    <b>1. BAPI_PS_INITIALIZATION
    2. BAPI_BUS2054_CREATE_MULTI ( to create  WBS )
             or
    2. BAPI_BUS2054_CHANGE_MULTI ( to change WBS )
    3. BAPI_PS_PRECOMMIT
    4. BAPI_TRANSACTION_COMMIT</b>
    Check the documentation of BAPI "BAPI_BUS2054_CREATE_MULTI " to see how these function modules work.
    Let me know if you need further information.
    Regards,
    RS

  • How to get list of FMs while creating Contact Person from User Admin Link

    Hi Experts,
    We are implementing SAP ECommerce for my SAP ERP. In one of our requirements, we need to develop MASS UPLOAD program which will take input as Contact Person's first name, last name, address and authorization details and create new Contact Person as it is done through User admin link.
    To develop above tool, I want to trace all the Function Modules which are called while creating new Contact Person from User admin link.
    Please provide your inputs on how I can get the trace of FMs.
    Thanks,
    Keya

    Hi Keya,
    For a B2C eCommerce solution, you are looking at FMs BAPI_CUSTOMER_CREATEFROMDATA1 and ISA_USER_CREATE and the table USAPPLREF which holds the reference to the customer and user.
    To get the FMs called, you would have to do a session trace during B2C user registration / B2B user creation from UME. You could search this forum on a 'how-to' for doing a session trace or lookup the development and extension guide that provides a lot of useful information.
    Cheers,
    Ashok.

  • Problem While Creating Physical Standby Using RMAN

    Hi Guru's
    May be this incidence you all face while creating physical standby DB. I try to create Physical standby database Using RMAN Duplicate Command from one server
    (pri machine) to Standby Machine.
    The steps i followed to create the above are as follows:
    Step 1:- Enable Forced Logging
    SQL> ALTER DATABASE FORCE LOGGING;
    Step 2:- Configure a Standby Redo Log
    SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10
      2> ('/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;
    Step 3:- Set Primary Database Initialization Parameters
    SQL> create pfile='?/dbs/pfileorcl.ora' from spfile;
    Edit the pfile to add the standby parameters, here shown:
    db_unique_name='orcl'
    LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcldr)'
    LOG_ARCHIVE_DEST_2='SERVICE=orcldr LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldr'
    *.fal_server=orcldr
    *.fal_client=orcl
    *.standby_file_management=auto
    Step 4:- Enable Archiving
    SQL> SHUTDOWN IMMEDIATE;
    SQL> STARTUP MOUNT;
    SQL> ALTER DATABASE ARCHIVELOG;
    SQL> ALTER DATABASE OPEN;
    Step 5:- Setup tnsnames for standby database
    This should be done on primary database by altering tnsnames.ora or using NetCA command, and create it by the name orcldr
    orcldr =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = standby-svr)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcldr)
    Step 6:- Backup database and copy it to standby
    This backup script should be run on primary and copied to standby on the same mount point, running this scripts using RMAN, all files under /rman_backup should be copied to /rman_backup on standby server.
    $rman target /
    RMAN> run
    allocate channel c1 type disk;
    allocate channel c2 type disk;
    backup database format '/rman_backup/%U';
    backup archivelog all format '/rman_backup /%U';
    backup current controlfile for standby format '/rman_backup/%U';
    Step 7:- Standby Database Steps
    Installing Oracle Software
    This should be same release and patchset with exactly same ORACLE_HOME mount point.
    Setting Up listener
    Create and start a listener on standby database using NetCA, or creating listener.ora in $ORACLE_HOME/network/admin
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = standby-svr)(PORT = 1521))
    Step 8:- Set Standby Database Initialization Parameters
    Copying the pfile created in primary database and renames it to initorcldr.ora, and changes these parameters:
    db_unique_name='orcldr'
    LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcldr,orcl)'
    LOG_ARCHIVE_DEST_2='SERVICE=orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
    *.fal_server=orcl
    *.fal_client=orcldr
    *.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
    Step 9:- Setup tnsnames for primary database
    This should be done on standby database by altering tnsnames.ora or using NetCA command, and create it by the name orcl
    orcl =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primary-svr)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    Step 10:- Copy a Password File
    A password file must be created on the Primary and copied over to the Standby site. The sys password must be identical on both sites. Copy orapworcl to $ORACLE_HOME/dbs and rename file to orapworcldr
    Step 11:- Create mount points for Oracle
    Mount point should be created on standby server with the same convention used in primary, this includes the location for controlfiles, redo logs, datafiles, archive log destination and alert logs.
    $ mkdir -p /u01/app/oracle/oradata/orcl/
    $ mkdir -p /u01/app/oracle/flash_recovery_area/
    $ mkdir -p /u01/app/oracle/admin/orcl/adump
    $ mkdir -p /u01/app/oracle/admin/orcl/bdump
    $ mkdir -p /u01/app/oracle/admin/orcl/cdump
    $ mkdir -p /u01/app/oracle/admin/orcl/udump
    Step 12:- Use RMAN to restore backup and setup standby
    Connect to RMAN and execute the following command to create standby database, this should be performed on standby server after copying backup and setting tnsnames.
    $ export ORACLE_SID=orcldr
    $ rman target sys/tiger@orcl auxiliary sys/tiger@orcldr
    RMAN> duplicate target database for standby dorecover;
    Here i am getting problem as :
    While trying to connect to traget database and auxiliary database i notice that when RMAN is connect to both databases it shows
    orcl ( DBID xyz)
    orcl (not mounted)
    Here in my view the second database must be standby database name or auxiiary db name is standby db name which in my case is orcldr
    after this issue i am facing the second issues as :
    in command
    duplicate target database for standby dorecover;
    After modifying the command to
    RMAN> duplicate target database to "standby";
    rman-05520 database name mismatch
    Can u please let me know where i am mistaking

    ok for pri:
    db_name=orcl
    db_unique_name=orcl
    for standby:
    db_name=orcl 
    db_unique_name=sbyorcl ( i change orcldr to sbyorcl later)for new testing
    but now what i am getting on
      Verify connectivity
    On Primary Server:
    C:\> lsnrctl stop LISTENERI (working fine)
    C:\> lsnrctl start LISTENER (working fine)
    C:\> tnsping orcl (working fine)
    C:\> tnsping sbyorcl (working fine)
    C:\> sqlplus sys/xxxxx@orcl (working fine)
    C:\> sqlplus sys/xxxxx@sbyorcl (not working fine)
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    On Standby Server:
    C:\>lsnrctl stop LISTENER
    C:\> lsnrctl start LISTENER
    C:\> tnsping orcl
    C:\> tnsping sbyorcl
    C:\> sqlplus sys/xxxxx@orcl
    C:\> sqlplus sys/xxxxx@sbyorcl
    My listner file for pri :-
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (SID_NAME = ORCL)
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
    tnsnames.ora file on pri is:
    sbyorcl =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = sbyorcl)
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
    and listener file on standby :
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (PROGRAM = extproc)
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (SID_NAME = orcl)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    and tnsnames.ora file on standby:
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
    sbyorcl =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
    (CONNECT_DATA =
           SERVICE_NAME = sbyorcl)
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
    Kinldy guide me where i am mistaking it's urgent

  • Problem while creating service PO using bapi_po_create1

    hi all,
        i am getting error :
    In case of account assignment, please enter acc. assignment data for item
    what does this mean?
    please help,,
    thanks,
    Siddhartha Prakash

    Hi Sid.
    I'm having this same problems on creating PO Service. Did you solve it? How did you do that?
    I'm using a PR and the Category is 'Y', and I cant find where is the problem.
    The tables that I'm passing to the BAPI_PO_CREATE1 are:
    POITEM/ POITEMX
    POACCOUNT/ POACCOUNTX
    POSERVICES
    POSRVACCESSVALUES
    Please, if you have any idea, let me know!
    Tks a lot!
    Renata

  • Problem while creating partner link using https URL

    Hi,
    To create the partnerlink using https URL, I had done the following:
    -Imported the self signed certificate into the OraBPELPM_\jdk\jre\lib\security\cacert
    -Added following entries in OraBPELPM_1\integration\jdev\jdev\bin\jdev.conf
    AddVMOption -Djavax.net.ssl.keyStore=E:\OraBPELPM_1\jdk\jre\lib\security\cacert
    AddVMOption -Djavax.net.ssl.keyStorePassword=esbtest123
    I am not able to create partner link using URL https://localhost/orabpel/default/ErrorHandlerBPEL/1.0/ErrorHandlerBPEL?wsdl .
    Able to create partnerlink using same URL if I replace https with http.
    Did I miss any other configuration that needs to done to create partnerlink using https in JDeveloper BPEL Designer.
    Thanks,
    -Vidya

    Hi,
    I  too have the same issue. Appriciate if you share some knowledge on this issue.
    Thanks
    Aravinda

  • Problem while creating logical port using soamanager

    Hi all,
    I have created a client proxy for web service from a 3rd party system.
    When i am creating a logical port for the same consumer proxy i get a error as follows:
    RABAX_STATE -e: UNCAUGHT_EXCEPTION
    and a dump saying
    "  The exception 'CX_SXMLP' was raised, but it was not caught anywhere along the call hierarchy.
         Since exceptions represent error situations and this error was not adequately responded to, the running ABAP program
          'CL_SXMLP_FRAGMENT=============CP' has to be terminated.                  
    Please suggest what can be done or what can be the problem.
    Thanks in advance.
    Komal

    Pls go to txn SM59 and check if the RFC destination for webservice is working in the test connection.
    Then go to txn LPCONFIG and create the logical port using the RFC dest.  Pls mention the path suffix appropriately.
    Next in your code while instantiating the client proxy pass the logical port name in the constructor (if the LP is not maintained as default).
    Pls reward points if the tips are helpful.

  • Problem while creating sales order using BAPI

    Hi all,
    i am creating a sales order from the purchase order data.
    when my client will send a PO in EDI format, my 3rd party edi tool will convert that edi formatted PO to text format. then i will upload that text formatted PO to my program then i will create a SO from those uploaded PO data using BAPI BAPI_SALESORDER_CREATEFROMDAT2.
      but,no sales order is being created.& also i am not getting any return message.by debugging also, i am not getting the error.plz suggest where i am doing mistake.below is the coding.
    DATA:
      gfilename LIKE rlgrap-filename.
    *--Internal tables
    DATA: BEGIN OF i_item OCCURS 50.    "Create Material Document Item
            INCLUDE STRUCTURE BAPISDITM .
    DATA: END OF i_item .
    DATA: BEGIN OF i_partner OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE BAPIPARNR.
    DATA: END OF i_partner.
    DATA: BEGIN OF i_schedule OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE BAPISCHDL .
    DATA: END OF i_schedule.
    DATA: BEGIN OF i_cond OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE BAPICOND .
    DATA: END OF i_cond.
    DATA: BEGIN OF i_part OCCURS 0,     " Internal table for split data
            part(20),
          END OF i_part.
    DATA: BEGIN OF i_return OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF i_return.
    *-- Work areas
    DATA: BEGIN OF wa_header .       "sales Document Header Data
            INCLUDE STRUCTURE BAPISDHD1.
    DATA: END OF wa_header .
    *DATA: BEGIN OF wa_return .       "Output Structure
           INCLUDE STRUCTURE BAPIRET2.
    *DATA: END OF wa_return .
    DATA: begin of sorder.
         INCLUDE STRUCTURE BAPIVBELN.
    DATA: end of sorder.
    data:begin of t_upload,
         ebeln(10),  "PO no(seagate)
         aedat like sy-datum , "PO date
         bsart(4) , "PO type
         vdatu like sy-datum , "requested delivery date
         kunnr(10) , "customer no-sold-to-party
        kunak like vbak-kunnr, "bill-to-party
         name1_s(20), "name1 of sold-to-party
         name2_s(15), "name2 of sold-to-party
         land1_s(3), "country
         ort01_s(10),  "city
         regio_s(3), "region(state/province)
         pstlz_s(10), "postal code
         adrnr_s(10), "address
         bstkd_e(10), "end customer purchase order
         posex(6),     "end customer PO line no(item no)
         kdmat(18),     "end customer material no(part no)
         kunag(10),     "ship-to-party
         name1_c(20),   "name1 of ship-to-party
         name2_c(15),   "name2 of ship-to-party
         land1_c(3),   "country
         ort01_c(10),    "city
         regio_c(3),   "region(state/province)
         pstlz_c(10),   "postal code
         adrnr_c(10),   "address
         posnr(6), "item no(seagate PO line no)
         pstyv(4), "item category
         matnr(18), "material no(seagate 9 digit part no)
         zmeng(13), "Target quantity in sales unit
        vrkme like vbap-vrkme, "sales unit
         meins(3), "UOM
        posnr_tot like vbap-posnr,"Total no. of line items
         werks(4), "plant
        vstel like vbap-vstel, "shipping point
         empst(10), "receiving point
         shtyp(4), "shipment type
         route(6), "route
         vsbed(2), "shipping conds
        rkfkf like vbap-rkfkf, "method of billing for co/ppc orders
         zterm(4), "terms of payment key
         inco1(3), "F.O.B inco term1
         inco2(3), "F.O.B inco term2
         end of t_upload.
    Data: wa_upload like t_upload,
           i_upload like standard table of t_upload.
    Data:v_kunnr like kna1-kunnr,
          v_posnr like vbap-posnr,
          v_matnr like vbap-matnr,
          v_zmeng like vbap-zmeng,
          v_kunag like kna1-kunnr.
    *---Constants
    CONSTANTS: c_comma TYPE c VALUE ',',   " For splitting data at commas
               c_01(2) TYPE c VALUE '01',  " For movement code in Bapi
               c_b     TYPE c VALUE 'B',   " For mvt. Indicator in Bapi
               c_creat(5) TYPE c VALUE 'CREAT', " For button text
               c_clear(5) TYPE c VALUE 'CLEAR', " For clear button
               c_mvmt(4) TYPE c VALUE 'MVMT',
               c_ok(2)   TYPE c VALUE 'OK',
               c_error(5) TYPE c VALUE 'Error'.
    *--SELECTION SCREEN DESIGN--
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS:     
                p_auart LIKE vbak-auart, " order type
                p_vkorg LIKE vbak-vkorg, " sales org
                p_vtweg LIKE vbak-vtweg, " dist channel
                p_spart LIKE vbak-spart, " division
                p_vkgrp LIKE vbak-vkgrp, " sales group
                p_vkbur LIKE vbak-vkbur, "sales office
                p_file(256) default 'c:/saleorder.txt'.         "File name
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN PUSHBUTTON 15(10) v_create USER-COMMAND creat.
    SELECTION-SCREEN PUSHBUTTON 40(10) v_clear USER-COMMAND clear.
      INITIALIZATION -
    INITIALIZATION.
      v_create = c_creat .
      v_clear = c_clear.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    PERFORM selectfile USING p_file.
    *--AT SELECTION_SCREEN--
    AT SELECTION-SCREEN .
      IF sy-ucomm = c_clear.
        PERFORM f_clear.
    ELSE.
       IF sy-ucomm <> c_mvmt.
    **--- Validating the input data.
         PERFORM f_check_inputs.
        ELSEif sy-ucomm = c_creat.
    *--- Validating the input data.
          PERFORM f_check_inputs.
    *-- Uploading the PO data.
          PERFORM f_PO_upload.
    *---checking the PO data
         PERFORM f_check_upload_data.
    *---create sales order from PO data
        PERFORM f_Sales_order_create.
        ENDIF.
    FORM f_PO_upload.
    gfilename = p_file.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = gfilename
                filetype                = 'DAT'
           TABLES
                data_tab                = i_upload
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
        MESSAGE i398(00) WITH '(WS_UPLOAD)'
        ' Errors occured with exception '
         sy-subrc.
      ENDIF.
    ENDFORM.                    " f_PO_upload
    *&      Form  selectfile
          text
         -->P_P_FILE  text
    FORM selectfile CHANGING value(filename) TYPE c.
    CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename     = gfilename
                def_path         = 'C:\'
                mask             = ',*.txt.'
                mode             = 'O'
                title            = 'Select File Name'
           IMPORTING
                filename         = filename
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
    ENDFORM.                    " selectfile
    FORM f_Sales_order_create.
      PERFORM f_fill_header.
      PERFORM f_fill_partner.
      PERFORM f_fill_item.
      PERFORM f_call_BAPI.
    ENDFORM.                    " f_Sales_order_create
    *&      Form  f_fill_header
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_header.
    move p_auart to wa_header-doc_type.
    move p_vkorg to wa_header-sales_org.
    move p_vtweg to wa_header-distr_chan.
    move p_spart to wa_header-division.
    move p_vkgrp to wa_header-sales_grp.
    move p_vkbur to wa_header-sales_off.
    Read table i_upload into wa_upload index 1.
    move wa_upload-ebeln to wa_header-purch_no_c.
    move wa_upload-aedat to wa_header-purch_date.
    move wa_upload-bsart to wa_header-po_method.
    move wa_upload-vdatu to wa_header-req_date_h.
    move wa_upload-bstkd_e to wa_header-purch_no_s.
    *move wa_upload-route to wa_header-route.
    move wa_upload-vsbed to wa_header-ship_cond.
    move wa_upload-empst to wa_header-rec_point.
    move wa_upload-shtyp to wa_header-ship_type.
    move wa_upload-zterm to wa_header-pmnttrms.
    move wa_upload-inco1 to wa_header-incoterms1.
    move wa_upload-inco2 to wa_header-incoterms2.
    ENDFORM.                    " f_fill_header
    *&      Form  f_fill_partner
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_partner.
    if not wa_upload-kunnr is initial.
    select single kunnr from kna1 into v_kunnr
                where kunnr = wa_upload-kunnr.
    if sy-subrc <> 0.
    Message E014 with 'customer does not exist'.
    else.
    move 'AG' to i_partner-partn_role.
    move wa_upload-kunnr to i_partner-partn_numb.
    move wa_upload-land1_s to i_partner-country.
    move wa_upload-name1_s to i_partner-name.
    move wa_upload-name2_s to i_partner-name_2.
    move wa_upload-ort01_s to i_partner-city.
    move wa_upload-regio_s to i_partner-region.
    move wa_upload-pstlz_s to i_partner-postl_code.
    move wa_upload-adrnr_s to i_partner-address.
    append i_partner.
    endif.
    endif.
    if not wa_upload-kunag is initial.
    select single kunnr from kna1 into v_kunag
                where kunnr = wa_upload-kunag.
    if sy-subrc <> 0.
    Message E015 with 'end customer does not exist'.
    else.
    move 'WE' to i_partner-partn_role.
    move wa_upload-kunag to i_partner-partn_numb.
    move wa_upload-land1_c to i_partner-country.
    move wa_upload-name1_c to i_partner-name.
    move wa_upload-name2_c to i_partner-name_2.
    move wa_upload-ort01_c to i_partner-city.
    move wa_upload-regio_c to i_partner-region.
    move wa_upload-pstlz_c to i_partner-postl_code.
    move wa_upload-adrnr_c to i_partner-address.
    append i_partner.
    endif.
    endif.
    ENDFORM.                    " f_fill_partner
    *&      Form  f_fill_item
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_item.
    loop at i_upload into wa_upload.
    if not wa_upload-matnr is initial.
    select single  maramatnr msegmenge into (v_matnr, v_zmeng) from
                       mara inner join mseg on maramatnr = msegmatnr
                       where mara~matnr = wa_upload-matnr.
    if sy-subrc <> 0.
    Message E016 with 'material no does not exist'.
    elseif v_zmeng LT wa_upload-zmeng.
    Message E017 with 'order quantity is greater than the quantity present'.
      endif.
    endif.
    move wa_upload-posnr to i_item-itm_number.
    move wa_upload-pstyv to i_item-item_categ.
    move wa_upload-matnr to i_item-material.
    move wa_upload-zmeng to i_item-target_qty.
    move wa_upload-meins to i_item-target_qu.
    move wa_upload-werks to i_item-plant.
    *move wa_upload-meins to wa_vbap-meins.
    *move wa_upload-posnr_tot to wa_vbap-posnr_tot.
    move wa_upload-posex to i_item-po_itm_no.
    move wa_upload-kdmat to i_item-cust_mat22.
    move wa_upload-inco1 to i_item-incoterms1.
    move wa_upload-inco2 to i_item-incoterms2.
    move wa_upload-zterm to i_item-pmnttrms.
    move wa_upload-empst to i_item-rec_point.
    move wa_upload-shtyp to i_item-ship_type.
    move wa_upload-route to i_item-route.
    append i_item.
    PERFORM f_fill_schedule_line.
    PERFORM f_fill_conditions.
    ENDLOOP.
    ENDFORM.                    " f_fill_item
    *&      Form  f_fill_schedule_line
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_schedule_line.
    move wa_upload-matnr to i_schedule-itm_number.
    move sy-datum to i_schedule-req_date.
    move wa_upload-zmeng to i_schedule-req_qty.
    append i_schedule.
    ENDFORM.                    " f_fill_schedule_line
    *&      Form  f_fill_conditions
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_conditions.
    move wa_upload-matnr to i_cond-itm_number.
    move sy-datum to i_cond-conpricdat.
    append i_cond.
    ENDFORM.                    " f_fill_conditions
    *&      Form  f_clear
          text
    -->  p1        text
    <--  p2        text
    FORM f_clear.
    clear:p_auart,
          p_vkorg,
          p_vtweg,
          p_spart,
          p_vkgrp,
          p_vkbur.
    ENDFORM.                    " f_clear
    *&      Form  f_call_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM f_call_BAPI.
    clear:i_item,i_partner,i_schedule.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
      SALESDOCUMENTIN               =
        ORDER_HEADER_IN               = wa_header
      ORDER_HEADER_INX              =
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                  = sorder
      TABLES
      RETURN                        =
       ORDER_ITEMS_IN                 = i_item
      ORDER_ITEMS_INX               =
        ORDER_PARTNERS                = i_partner
       ORDER_SCHEDULES_IN             = i_schedule
      ORDER_SCHEDULES_INX           =
      ORDER_CONDITIONS_IN            = i_cond.
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
    if not ( sorder-vbeln is initial ).
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    write: /'Order number:', sorder.
    else.
    loop at i_return.
    write: / i_return-id, i_return-number, i_return-message(80).
    endloop.
    *write: /'Error'.
    endif.
    *loop at i_return.
    *write: / i_return-id, i_return-number, i_return-message(80).
    *endloop.
    ENDFORM.                    " f_call_BAPI

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • Problem while creating table dynamically using stored procedure

    Hi all
    When i try to execute the following lines get insufficient privilege error.
    FYI: i m able to create table statically.(i.e without using stored procedure)
    CREATE OR REPLACE PROCEDURE pcalling IS
    str varchar2(60);
    BEGIN
    str:='create table t15(tno number,tname varchar2(5))';
    execute immediate str;
    END;
    Thanks in advance
    Satya

    hi
    SQL> CREATE OR REPLACE PROCEDURE runddl (ddl_in in VARCHAR2)
      2     AUTHID CURRENT_USER
      3  IS
      4  BEGIN
      5     EXECUTE IMMEDIATE ddl_in;
      6  END;
      7  .
    SQL> /
    Procedure created.AUTHID CURRENT_USER clause before the IS keyword which runddl executes, it should run under the authority of the invoker, or current user not the authority of the definer.
    if you omit it then it will no longer will be run if the creator doesnt have privelege to run this ddl regardless invoker has or not.
    i hope you got it
    Khurram Siddiqui
    [email protected]

  • Problem while creating generic DataSource using table

    Hello all,
    I am creating a generic DataSource using table EKBE. It is giving error " invalid extract structure template EKBE ". The reason is " The system tried to generate an extract structure with the template structure EKBE. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table (EKPO)".
    Could you suggest how to approach?
    Thanks,
    Zak.

    hi zahir,
    In your case the reference table used for quantity is ekko and the field is meins.
    and the reference table used for currency is ekpo and the field is waers.
    So you are not taking data from a single table. so you better create a view give the table name ekbe and select the corresponding fields you want.
    Add MEINS and WAERS and as well your required field in the view for example Zview and for Quantity field mention Zview as reference table and reference field as MEINS same for WAERS.
    try this if it doent work, tell me what error you are facing.
    with regards!
    ramesh

  • SRM: Create Contact Person Could not create user; contact your system admin

    Hi All,
    First, I am not sure this question should be posted here, or SRM General. From my point of view, here is more suitable.
    Our Problem:
    Activity "Create Contact Person With Reference" error with message:
    Step to reproduce:
    1. Login to SRM JAVA as super administrator
    2. Open tab "SRM Administration"
    3. Using the current query, search for Business-Partner no: 30000725
    4. Press "Create Contact Person with Reference"
    5. Fill all required fields, tick "Is contact person" checkbox
    6. Put: /SAPSRM/SUPPLIER as Role
    7. Save
    The following Message appear:
    Could not create user; contact your system administrator
    SPML Service error: Error reading request status.  Display Help
    Contact Person 2000000214 Created Successfully for BP 30000725  Display Help
    E-mail was sent
    The first error is intriguing. The username & password is created successfully in ABAP System (Our UME is in ABAP).
    QUESTIONS:
    1. What cause this problem? How to trace the error?
    2. We want the user have portal role automatically. How to achieve that?
    Thank you for any responses and helps.
    SRM ABAP Version:
    SRM_PLUS     700     0009     SAPKIBK209     SRM_PLUS for mySAP SRM
    SRM_SERVER     700     0009     SAPKIBKV09     SRM_SERVER
    SAP_ABA     701     0007     SAPKA70107     Cross-Application Component
    SAP_BASIS     701     0008     SAPKB70108     SAP Basis Component
    PI_BASIS     701     0007     SAPK-70107INPIBASIS     Basis Plug-In
    SRM JAVA Version:
    SRM JAVA: Release 7 SP Level 9.0
    BP SRM: Release 7 SP Level 9.0
    Edited by: Nur Agus Suryoko on Mar 11, 2011 11:36 AM
    Version information added

    Hi Fernando,
    Can you please tell me how you resolved this issue ??
    Regards,
    Adren

  • Error while creating vendor contact person using vmd_ei_api

    Hi,
    while craeting vendor contact person using maintain_bapi of vmd_ei_api class iam getting error like 'Specify address number or address handle'.
    code :
    CALL FUNCTION 'BAPI_PARTNEREMPLOYEE_GETINTNUM'
    EXPORTING
    quantity = 1
    IMPORTING
    * RETURN =
    contactid = lv_contactid
    * QUANTITY =
    * TABLES
    * CONTACT =
    ls_contacts1-task = 'I'.
    ls_contacts1-data_key-parnr = lv_contactid."ls_knvk-parnr.
    ls_contacts1-data-abtnr = '0002'."ls_knvk-abtnr.
    ls_contacts1-data-pafkt = '02'."ls_knvk-pafkt.
    ls_contacts1-data-parau = 'BNotes'."ls_knvk-parau.
    ls_contacts1-datax-abtnr = 'X'.
    ls_contacts1-datax-pafkt = 'X'.
    ls_contacts1-datax-parau = 'X'.
    * Inserting Phone ,Fax and email.
    ls_phone-contact-task = 'I'. "Phone
    ls_phone-contact-data-telephone = '89655696569'.
    ls_phone-contact-data-extension = '778548'.
    ls_phone-contact-datax-telephone = 'X'.
    ls_phone-contact-datax-extension = 'X'.
    APPEND ls_phone TO lt_phone.
    ls_phone-contact-task = 'I'.
    ls_phone-contact-data-r_3_user = 'X'.
    ls_phone-contact-data-telephone = '89845589369'.
    ls_phone-contact-data-extension = '858588'.
    ls_phone-contact-datax-updateflag = 'X'.
    ls_phone-contact-datax-telephone = 'X'.
    ls_phone-contact-datax-extension = 'X'.
    ls_phone-contact-datax-r_3_user = 'X'.
    APPEND ls_phone TO lt_phone.
    ls_fax-contact-task = 'I'.
    ls_fax-contact-data-fax = '8896589'.
    ls_fax-contact-data-extension ='44521'.
    ls_fax-contact-datax-fax = 'X'.
    ls_fax-contact-datax-extension ='X'.
    APPEND ls_fax TO lt_fax.
    ls_contacts1-address_type_3-communication-phone-current_state = ' '.
    ls_contacts1-address_type_3-communication-phone-phone = lt_phone.
    ls_contacts1-address_type_3-communication-fax-current_state = ' '.
    ls_contacts1-address_type_3-communication-fax-fax = lt_fax.
    ls_contacts1-address_type_3-communication-fax-current_state = ' '.
    ls_contacts1-address_type_3-communication-fax-fax = lt_fax.
    ls_contacts1-address_type_3-task = 'I'.
    ls_contacts1-address_type_3-POSTAL-data-FIRSTNAME = 'Roger'.
    ls_contacts1-address_type_3-postal-data-lastname = 'Fedrer'.
    ls_contacts1-address_type_3-POSTAL-datax-FIRSTNAME = 'X'.
    ls_contacts1-address_type_3-postal-datax-lastname = 'X'.
    APPEND ls_contacts1 TO lt_contacts1.
    ls_vendor1-header-object_instance = p_lifnr.
    ls_vendor1-header-object_task = 'M'.
    ls_vendor1-central_data-contact-contacts = lt_contacts1.
    ls_vendor1-central_data-contact-current_state = 'X'.
    ls_vendor1-central_data-central-data-adrnr = ls_adrnr.
    ls_vendor1-central_data-central-datax-adrnr = 'X' .
    APPEND ls_vendor1 TO lt_vendor1.
    gs_vmds_extern-vendors = lt_vendor1.
    DATA:gs_succ_messages TYPE cvis_message,
    gs_vmds_error TYPE vmds_ei_main,
    gs_err_messages TYPE cvis_message,
    gs_vmds_succ TYPE vmds_ei_main.
    * Call the Method for creation of Vendor.
    CALL METHOD vmd_ei_api=>maintain_bapi
    EXPORTING
    is_master_data = gs_vmds_extern
    IMPORTING
    es_master_data_correct = gs_vmds_succ
    es_message_correct = gs_succ_messages
    es_master_data_defective = gs_vmds_error
    es_message_defective = gs_err_messages.
    if sy-subrc  = 0.
    commit work.
    Please suggest which fields else i have to pass??

    Hi Abhijeet,
    here i am showing you some scn help to use maintain bapi of vmd_ei_api class, i think you are missing some data to be uploaded along with there are methods in lsmw, bdc too for this, please go through below links carefully , i hope you will able to solve your problem.
    Vendor Master Upload Program - ABAP Development - SCN Wiki
    unable to vendor master record update using class vmd_ei_api
    Creation of Vendor - VMD_EI_API

  • Problem while creating contactpersons

    hi,
    In Tcode: XD01, we have a contactperson tab where we can fill up multiple contact person details along with their Private addresses and can create multiple contactpersons for a normal KNA1-customer.The same thing is to be implemented through portal screens.
    The steps which I followed in creation of customer are as follows.
    1)     FM: SD_CUSTOMER_MAINTAIN_ALL is used for creating customer and multiple contactpersons, by passing I_KNA1, contact persons details to KNVK (tableu2019s parameter) and PI_POSTFLAG = u2018Xu2019 and I_MAINTAIN_ADDRESS_BY_KNA1 = u2018Xu2019 . With this step I could create successfully multiple contact persons for a customer but not their private addresses (ContactPerson).
    2)     After commit work, FM: BAPI_ADDRESSPERS_SAVEREPLICA is called and Contact person number obtained in step1, OBJ_TYPE as u2018BUS1006001u2019 , Context as u20180004u2019 are passed and the private address details of contactpersons are filled up in BAPIAD2VL (tables parameters).
    3)     FM: CUSTOMER_UPDATE is called in update task mode by passing the updated KNVK table with address number and person number obtained in step2.
    With steps 1, 2 & 3 I could successful in creating customer with no errors raised but when I view the customer in display mode, a customer is created with multiple contact persons but the Home address details are not updated as desired
    I.e. the contactperson address details are not updated back into KNVK table (ADRNP_2) table and in some of adr... Tables.
    I even tried to create contactpersons with recording of Tcode u201CVAP1u201D (Create Contact persons) but the contact persons details are not updated back into KNVK and other required  ADRu2026 table as desired.
    To conclude: I need a FM which creates a customer with multiple contactpersons (along with Private address information which contains strret address,telephone numbers, remarks etc..).
    Can anyone offer me some code to do this? If not, how about some other suggestions as to how to do this.
    Regards,
    Srikanth

    Good evening....
    Could you please tell me how you fixed this problem?
    Thank you,
    Max

  • Creating Contact Person via Function Module

    Dear ABAP Gurus,
    try to add customer contact person via SD_CUSTOMER_MAINTAIN_ALL.
    KNVK - Kundenstamm Ansprechpartner
      MOVE '0000010010' to itab-kunnr.
      MOVE 'Firstname' TO itab-namev.
      MOVE 'Lastname' TO itab-name1.
      MOVE 'City' TO itab-ort01.
      MOVE 'DE' TO itab-parla.
      MOVE '' to itab-telf1.
      MOVE 'U' to itab-kz.
      APPEND itab to my_knvk.
    BAPI aufrufen
      CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
        EXPORTING
          PI_POSTFLAG = 'X'
        TABLES
          T_XKNVK = my_knvk.
    Runs without error but person record not created. Any ideas ?
    Thanks in advance for your help.
    Thomas

    Check for the sy-subrc value in Debug mode .
    Check do you need to commit COMMIT statement to update the table.
    Also look at this
    Changing Customers using SD_CUSTOMER_MAINTAIN_ALL
    Regards
    Vivek
    <b> please reward points for all the useful answers </b>

Maybe you are looking for

  • Ok...My Ipod is frozen, what next???

    My Ipod is frozen. I've tried resetting it. I've tried downloading the updater. I've hooked up to both my computer and USB adapter. I'm out of answers. I only have questions. This Ipod is not that old. It's a 20gb with only 1600 songs on it. What tri

  • WITH LSMW USING BATCH INPUT/DIRECT INPUT/BAPI/IDOCS

    IN WHAT SCENARIOS CAN WE USE BATCH INPUT/DIRECT INPUT/BAPI/IDOCS WITH LSMW.WHICH IS THE BEST ONE.PLEASE TELL ME THE SCENARIOS OF USAGE.

  • MM06E003 Number range and document number

    hi Is the functionality of MM06E003 Number range and document number( user exit ) is same in ECC 6.0  and ECC 5.0 Regards, vijay

  • Radio button &  file download

    Hi all, I have a requirement whre i use two radio buttons one for UNIX download and one for PC download.and below i have a paramenter field p_path where the file is to be downlaoded. Now i want to change my requirement such that, whn i click the radi

  • Dont want a line item catrgory to appear on VF04

    Hi Billing type - F2 Item Category - Billing Relevance (A), Pricing (X), I have a packing/pallet item on the delivery which is relevant for billing (A- delivery related billing). It does not appear on the billing document F2 but I dont want it to app