Problem for uplaoding sales text using LSMW

Hi,
I have use LSMW for uplaoding material masters sales and purchase order text ,  first I have done for purchase order text  with object : MATERIAL  and ID : BEST  it works fine for this  after that when I am trying same for uploading sales text    OBJECT : MVKE  and ID : 0001  it is picking file proerly  and till final BDC step it is not giving any error  but  in material master  sales text is not getting updated for that material.
  what canb be the problemm
also for pO text for matnr i have given only material code  18 Chr.
and for sales text  i hva egiven MATNR + SALES ORG. + DISTRIBUTION CHANNEL  as it required for sales text.
regards,
  zafar

Dear Zafar,
I found a similar problem while uploading Porduction order long text. May be this information is useful for you.
The common task of changing the long text of a production orderu2019s operation can bring some surprises.
The first problem that is usually encountered is that after updating the long text with the function SAVE_TEXT, the new text is not visible in standard SAP transactions like CO03. The new text can be read with the function READ_TEXT though. The trick is that SAP uses the u201Clong text existsu201D indicator, the field TXTSP in the table AFVC. To make the text u201Cvisibleu201D to standard transactions, we have to set the TXTSP value to the current language (or the textu2019s language). Unfortunately, this has to be done with the direct UPDATE on the AFVC u2013 there are no known workarounds.
Another problem can be seen when the same order is processed by users that use different languages. While SAP allows to store the long text for the same operation in several languages, actually, only one text object will be active at the same time in regard to standard transactions u2013 the object in the last saved language. That means, when SAP writes the text back, the TXTSP will be overwritten with the current language (say, language A). If the next user is working in another language (language B), SAP will present the text in the u201Cfirstu201D language (A) in the CO03 (even if the text in language B exists!). But after saving, the text will be written in the new language and TXTSP will be set accordingly.
So, when working with long texts directly, you have to read with READ_TEXT using the language stored in TXTSP, NOT with the current language. When saving, you save in the current language and set the TXTSP to the current language. This way you are consistent with what SAP does and this will prevent you from surprises in a multilingual environment.
Regards,
Kamal

Similar Messages

  • Transfer of Intercompany sales orders using LSMW

    Hi
    I have to Transfer the open intercompany sales orders using LSMW. Consider a scenario where customer places an order on sales org A with plant A. sales org A raises purchase order on Sales org B with plant B. The material moves from Plant B ie supplying plant to delivering plant A. THen it is delivered to custome from plant A. Can u please tell me whether i have to pass the suppying plant or it will be determined automatically. Similarly what about the purchase requisition no. Is it created automatically.
    Thanks
    regards
    Tushar

    Hi,
    The purchase requisition is going to automatically created incase of a intercompany order  (ie nothing but the third party order).  In this case of orders the line item category in the sales order would be TAS. The intercompany sales order nothing different from a normal order during the creation of the order, after that the operations will be different from the normal standard order.  You can use the same LSMW which you have used for transfering normal standard orders.
    The configs are going to be different in the system for intercompany sales orders compared to the standard sales orders. That is the problem of the functional consultant to take care.
    Thanks,
    Mahesh.

  • Update the material quantity in the sales order using LSMW...

    Hi Guru's,
    I created one sales order using BAPI..now i wanted update the material quantity in the sales order using LSMW...
    could you please provide the step by step process....
    if anyone of you provide the program logic similar to requirement that would be helpfull to me...
    thanks in advance
    Srinivas....

    Hi Sri,
    Hope it may help you.
    First do the recording for VA02 transaction, in that give the existing sales order number
    and update the Quantity and save it. Remaining steps are same what we used(LSMW) to upload data to applications.
    Regards,
    Vishvesh
    if helpful, rewards it.

  • Inbound Delivery For Scheduling Agreement Lines using LSMW

    Hi,
    We need to create inbound deliveries for scheduling agreements. Our scheduling Agreements are too big with 200 lines. But the vendor used to send only few discrete lines in his ASN. Is it possible to create inbound deliveries for the Scheduling agreement using LSMW? Is there any standard BAPI or IDOC available to handle this in LSMW? Has anyone done this before?
    Our requirement is as follows.
    1. Create Inbound Delivery for few lines of the Scheduling Agreement
    2. The delivery quantity of the inbound delivery will be a partial quantity of the Scheduling Agreement
    3. Materials are batch managed and the batch number for each inbound delivery item need to be captured.
    4. Vendor's ASN Number and its item number need to be captured at inbound delivery header and item level respectively.
    Note: Delivery Schedule of the Scheduling Agreement is not used in the above scenario.
    If you have any input, it will be really appreciated.
    Regards,
    SP0526

    Hi,
    You can give your scheduling agreement number in the field Purchase Order.
    If you want select from the list, you can click on PO tree (just under create inbound delivery). There selet document category as "L". You will get the scheduling agreement list.
    Regards,
    Prabu

  • How to create an Invoice for the sales order using the T-Code VF01

    Hello Experts,
    How to create an Invoice for a sales order using the T-Code VF01?
    Thanks in advace,
    Suma

    hi,
    Make the following settings-
    1. Create sales document and billing type
    2. assign billing type in sales document type config VOV8
    3. Activate itemcategory as sales order related billing
    4. Maintain copy control header and item level between sales order and billing
    5. Maintain pricing procedure for sales order and billing
    6. Define Output procedure in case to print invoice
    Regards
    Goutham

  • Problem when setting Reason of Rejection for a sales order using IDOC

    Hi All,
          I am working on a requirement where i need to put a reason for rejection as 'Item Cancelled' for a sales order via IDOC 'IDOC_INPUT_ORDCHG' in a third party scenerio where the PR is created automatically from the sales order . When the IDOC is run in the foreground I get the information message Subsequent function  " 'Purchase requisition from sales document' not possible Item & was rejected "(Message V1579) and the IDOC results in a error when run  in the background mode because of the same information message. The message should not appear when a sales order is being processed in the background but still the message is being displayed . Is there any way the message can be suppressed ? Thanks in Advance.
    Regards,
    Sowmya.

    can you send the program how you create a so or po using IDOC, as i've a assignment creating PO using IDOC & then creating a sales order of the PO. and i dont know how to create a IDOC. SO IF you have sample program it would be help full
    Thanxs

  • How to upload Methods long text using LSMW

    Hi,
    I am using LSMW - direct input program (Object 0001 Method - 0001)  to upload methods long text.
    I have two files with header and item as below
    Header file:
    Object : QPMETHODE
    ID : QMTT
    Item_id : link between header and item (method number)
    NAME: Passing concatenated value of  "sy-mandt, company code, Method number, 6 char space for version and language"
    Language : E or S.
    Item file:
    Item_id : link between header and item (Method number)
    Text Format : blank
    Text line : long text
    Here the problem is, after converting the data i have run the direct input program to upload the long text, but it is not updated in the transaction QS34.
    Could any one help in this?
    Thanks & Regards,
    Suresh.

    Hello,
    The field QMTT-LTEXTKZ is a flag which says whether Inspection method has a long text associated with it at transaction level. You are not able to see the Long text in the transaction though you have loaded & able to see the long text by FM READ_TEXT because in your case the field QMTT-LTEXTKZ = ' '. so I suggest you to load the long text in following way.
    Step 1: make a small recording to Tx: QS33 - push the long text button to get the long text editor. in this editor, on second line of the tag, put a * and save the transaction. By this way you put a X in field QMTT-LTEXTKZ & hence register a longtext for Inspection Method.
    Step 2: proceed with the loading the Long text with object 0001as you mentioned.
    Now you will be able to see the LT on the transaction level.
    Hope this helps.
    Regards, Murugesh

  • Sales order Using LSMW and BAPI BUS2032

    Hi Guys,
    I am trying to use LSMW for creating sales order through BAPI.
    Business Object      BUS2032
    Method               CREATEFROMDAT2          
    Message Type         SALESORDER_CREATEFROMDAT2
    Basic Type           SALESORDER_CREATEFROMDAT202
    I can do it using a BDC program.
    I want to know how the sales order flat file will look like (one header and multiple line item)if i am using LSMW with BAPI and how it is mapped for multiple line items.
    Thanks in Adv.
    Akhil

    See if you can get something out of this.
    One simple step by step example
    Complete the step one (you are using the correct BAPI )
    insetp 2(Maintain Source Structures) create source structures like with the header and details hierarchy                                                                               
    5  ZCFOF0021_HDR     Header                                              
               ZCFOF0021_PARTNER        Partner                                                                               
    ZCFOF0021_ITM            Item Detail                                                                               
    In Step 3(Maintain Source Fields) create the fields for all source structures like below example                                                                               
    5  ZCFOF0021_HDR   Header                        OLDNR         C(008)    Legacy JDE Sales Order Number                                                                               
    VKORG         C(004)    Sales Organization                                                                               
    VTWEG         C(002)    Distribution Channel                                                                               
    SPART         C(002)    Division                                                                               
    AUART         C(004)    Sales Document Type                                                                               
    VDATU         C(008)    Requested delivery date                                                                               
    BSTKD         C(020)    Customer purchase order number                                                                               
    BSARK         C(004)    Customer purchase order type                                                                               
    BSTDK         C(008)    Customer purchase order date                                                                               
    INCO1         C(003)    Incoterms (part 1)                                                                               
    INCO2         C(028)    Incoterms (part 2)                                                                               
    ZTERM         C(004)    Terms of payment key                                                                               
    LIFSK         C(002)    Delivery block (document header)                                                                               
    FAKSK         C(002)    Billing block in SD document                                                                               
    WAERK         C(005)    SD document currency                                                                               
    KURSK         C(009)    Exchange Rate for Pricing and Statistics                                                               
           AUTLF         C(001)    Complete delivery defined for each sales order                                                         
           VSBED         C(002)    Shipping conditions                                                                               
    ZOTC_PATNAME  C(035)    Patient Name                                                                               
    ZOTC_PATREFNO C(035)    Patient Reference Number                                                                               
    ZOTC_IMPDATE  C(008)     Implant Date                                                                               
    BNAME         C(030)    Branching name                                                                               
    TAXK1         C(001)    Alternative tax classification                                                                               
    5  ZCFOF0021_PARTNER         Partner                                                                               
    OLDNR        C(008)    Legacy JDE Sales Order Number                                                                               
    PARVW        C(002)    Partner function                                                                               
    KUNNR        C(010)    Sold To                                                                               
    NAME1        C(035)    Name 1                                                                               
    STRAS        C(035)    House number and street                                                                               
    STR_SUPPL1   C(040)    Street 2                                                                               
    LAND1        C(003)    Country Key                                                                               
    PSTLZ        C(010)    Postal Code                                                                               
    ORT01        C(035)    City                                                                               
    REGIO        C(003)    Region (State, Province, County)                                                                               
    AUART        C(004)     Sales Document Type                                                                               
    5  ZCFOF0021_ITM             Item Detail                                                                               
    OLDNR        C(008)    Legacy JDE Sales Order Number                                                                               
    MATNR        C(018)    Material Number                                                                               
    WERKS        C(004)    Plant                                                                               
    LGORT        C(004)    Storage Location                                                                               
    VRKME        C(003)    Sales unit                                                                               
    KSCHL2       C(004)    Condition type                                                                               
    KBETR2C      C(011)    Condition rate with decimal places and minus sign                                                    
              KWAER2       C(005)    Currency key                                                                               
    WMENGC       C(013)    Order qty in sales units - 00009001 corresponds to 9.001                                             
              CHARG        C(010)    Batch Number                                                                               
    In Step 4 (Maintain Structure Relations)  assign source structures to target strucutres like below                                                                               
    E1SALESORDER_CREATEFROMDAT2 Header Segment                                               <<<< ZCFOF0021_HDR     Header                                                                               
    E1BPSDHD1                   Communication Fields: Sales and Distribution Document Header <<<< ZCFOF0021_HDR     Header            
        E1BPSDHD1X                  Checkbox Fields for Sales and Distribution Document Header                                            
        E1BP_SENDER                 Logical System of Sender                                                                               
    E1BPSDLS                    SD Checkbox for the Logic Switch                                                                      
    5  E1BPSDITM                   Communication Fields: Sales and Distribution Document Item   <<<< ZCFOF0021_ITM     Item Detail                                                                               
    E1BPSDITM1                  Communication Fields: Sales and Distribution Document Item                                                                               
    E1BPSDITMX                  Communication Fields: Sales and Distribution Document Item                                            
        E1BPPARNR                   Communications Fields: SD Document Partner: WWW              <<<< ZCFOF0021_PARTNER Partner           
        E1BPSCHDL                   Communication Fields for Maintaining SD Doc. Schedule Lines  <<<< ZCFOF0021_ITM     Item Detail       
        E1BPSCHDLX                  Checkbox List for Maintaining SD Document Schedule Line                                               
        E1BPCOND                    Communication Fields for Maintaining Conditions in the Order <<<< ZCFOF0021_ITM     Item Detail       
        E1BPCONDX                   Communication Fields for Maintaining Conditions in the Order                                          
        E1BPCUCFG                   CU: Configuration Data                                                                               
    E1BPCUINS                   Instances of Several Configurations                                                                   
        E1BPCUPRT                   Part_of Entries of Several Configurations                                                             
        E1BPCUVAL                   Characteristic Values of Several Configurations                                                       
        E1BPCUBLB                   BLOB Internal Configuration Data (SCE)                                                                
        E1BPCUVK                    Variant Condition Keys in Configurations                                                              
        E1BPCUREF                   CU: Reference Order Item / Instance in Configuration                                                  
        E1BPCCARD                   Communication Table: Means of Payment Order/Billing Document                                          
        E1BPSDTEXT                  Communication Fields: SD Texts                                                                        
        E1BPSDKEY                   Key in Sales and Distribution Document                                                                
        E1BPPAREX                   Ref. Structure for BAPI Parameter EXTENSIONIN/EXTENSIONOUT   <<<< ZCFOF0021_ITM     Item Detail       
    5  E1BPADR1                    BAPI Reference Structure for Addresses (Org./Company)        <<<< ZCFOF0021_PARTNER Partner                                                                               
    E1BPADR11                   BAPI Reference Structure for Addresses (Org./Company)        <<<< ZCFOF0021_PARTNER Partner       
    In Step 5(Maintain Field Mapping and Conversion Rules) assign source fields to target fields
    Map each filed to the target fields.

  • 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 in Customer Master Upload using LSMW

    Hi,
    I am using LSMW direct input method to upload customer master. I have used ZSOURCE structure as parent structure and for multilple entries like Bank details and contact details i have used other child structure like ZBANK and ZCONTACT. I am using separate flat file for Bank and contact details.
    I have used one common field 'ID' as the first field both on ZSOURCE, ZBANK and ZCONTACT structure to link-up. Thus, i am able to load multiple records for Bank data. But i am unable to get contact details.
    Also, value for Reconciliation account(KNB1-AKONT) and sales group(KNVV-VKGRP) is not passed to screen.
    I have checked 'Generate Read Program','Read Data', 'Generate Conversion Program' and 'Convert Data' step again and again. Upto step 'Display Converted Data', data is converted successfully, but the same field values are not passed to screen.
    Can you pls help me to get the value..

    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, if that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Re: Table control in LSMW

  • Problem in Updating sales text in MM02 via BDC

    Hi All,
    I've created a BDC to update the Sales text for MM02. As the no of tabs for the view in MM02 are different for different materials, wrong tabs are selected while executing the BDC for different materials. I need to always select Sales text in the view.
    Kindly suggest.
    Thanks and Regards,
    Neha

    Hi,
    If you are only updating the sales text, then why not use function module SAVE_TEXT?
    refresh : headerl, itab3.
    headerl-tdobject = 'MVKE'.
    headerl-tdname = '000000000300000560000101'. "(Material : 000000000300000560, Sorg : 0001, Dist channel: 01)
    headerl-tdid  = '0001'.
    headerl-tdspras = 'E'.
    append headerl.
    move '*' to itab3-tdformat.
    move 'Testing sales text' to itab3-tdline.
    append itab3.
    call function 'SAVE_TEXT'
      exporting
        header                = headerl
       insert                = 'X'
       savemode_direct       = 'X'
      tables
        lines                 = itab3
    exceptions
       id                    = 1
       language              = 2
       name                  = 3
       object                = 4
       others                = 5
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards
    Vinod
    Edited by: Vinod Kumar on May 26, 2010 12:48 PM

  • Problem in material master upload using LSMW

    Dear All
    I am trying to upload material master using LSMW (batch input recording).
    I am facing problem while doing 14 step (Run Batch Input Session). When i'm running the batch input session, on the Create Material (Initial Screen), system picks values for material code, industry sector & material type but gives error message "select at least one view". system is not allowing me select the views which i selected while recording. system allows me to select all the view which i don't want.
    why system is asking me to select the views and also how to select the required view?
    thanks
    manoj gupta

    thanks charu
    do i need to do complete LSMW steps fpr all the view separately? if i do LSMW for basic view1, for other view do i need to go for change TCode or create T Code?
    thanks
    manoj gupta

  • PO text using lsmw MATERIAL MASTER

    Hi , how to upload PO text trhough LSMW as its only loading 132 char, if i have 400 char how to load.
    there is a structure in lsmw BMMH7, but what to pass in tdformat and tdline and TDSPRASISO
    thanks

    Hi Heilman ,
    thanks for the reply, but is there any other way by which I can upload PO text as I have potext in one column and line. I am using LSMW , where it concatenates to 132 character, but i have to upload full say 400 char text.
    thanks
    bobby

  • 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

  • Sales Report for US Sales and Use tax

    Hi,
    I'm looking for t-code to extract detailed sales report having Gross sales, Exempt sales , Ship to state, Ship to County\ City,  Sales Tax collected. If I'm getting this report i can verify what my sales tax software is updating.
    When i extract  tcode - ZINVLIS i don't get much detail.
    Please help me in extracting complete sales detail which can be used for sales and use tax verification process and audit purpose.
    Thanks,
    Karthik

    Hi Karthik,
    There is no standard report available as per my knowledge.You may develop Z report to achive your requirment. Check some LIS report can give data (MC01 is transaction where you can check all type of key figure reports)
    Regards
    Mani Kumar

Maybe you are looking for

  • How to print a graph in LV7.0

    I have a waveform graph,how to print it? thanks a lot!

  • IMovie Error (-50) PLEASE HELP!

    I'll make this short. I have a movie I made in iMovie, 14 hours, 32 minutes, and 52 seconds long. I'm trying to export it so I can burn it. Instead, it says: Unable to prepare project for publishing The project could not be prepared for publishing be

  • IDoc Configuration for Production Order Creation and Change

    Hi All, Please Help me out for IDoc Configuration for Production Order Creation and Change I have found the IDoc for Production Order Messgae Type : LOIPRO and IDoc type : LOIPRO01 Actually my requirment is to send the (LOIPRO01 )IDoc from SAP R/3 to

  • The top of my ACD 20" is messed up... :(

    Hi people, I don't know if this is a common issue, I checked a couple of pages and did'nt saw anything... It's that the top of my screen is like... bleeding-- there are like weird waves, a little like someone would have put their finger on it and and

  • MassAllocation increase number of digits

    Hi, How can we increase the number of digits in the window of MassAllocate (Hyperion planning Web Form) - for the moment the maximum number of digits that you can enter in Mass Allocate Form window using increase or decrease it's 7. We are working wi