Industry Key

Hi, All,
What means Industry Key in the vendor master data?
How to use this? Where and when to use this functionality?
Thanks,

Dear,
The Industry Key in Vendor Master - Control - Reference Data - used to assign a vendor under a specific Industry type i.e type of business.
For Example:
Bearing Vendors: FAG, SKF; HSBC - Banking; Raw material suppliers; Spare parts suppliers; Transport Vendors etc etc.
This specification is useful for future evaluations, or obtain list of a specific industry type vendors.
In simple, a distinct group of vendors with same nature of job OR basic nature of activity.
Regards,
Syed Hussain.

Similar Messages

  • BRSCH Industry Key issue in MDG-S

    Hi All,
    We have added VEN_BRSCH field under Entity Type BP_VENGEN, and also maintained the SMT mapping for the same.
    But the Value associated with the BRSCH is only visible in the stagging area and not able in the Active area ( Please note we have included this field under ERP Vendor and the create Supplier CR is approved and activated.)
    PLease find attached the screen shot.
    NOTE: MDG-S
    Best Regards,
    Athmaraman

    Hi Athmaraman,
    branches have to be maintained as "Industries" on the business partner level. CVI takes care of mapping the default industry of the default industry system to the vendor's BRSCH field. Adding the field to BP_VENGEN is neither supported nor recommended.
    Best regards
    Michael

  • How to know which master data objects need to activated  in R3

    SALES OVERVIEW CUBE -0SD_C03
    How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.
    its very urgent please advise.
    R/3 in RSA5
    Sales Master Data
    0ACCNT_ASGN_TEXT               Account assignment group for this customer   
    0ACCNT_GRP_TEXT                Customer account group                       
    0BILBLK_DL_TEXT                Locked                                       
    0BILBLK_ITM_TEXT               Billing block for item                       
    0BILL_BLOCK_TEXT               Billing block in SD document                 
    0BILL_CAT_TEXT                 Billing Category                             
    0BILL_RELEV_TEXT               Relevant for Billing                         
    0BILL_RULE_TEXT                Billing rule                                 
    0BILL_TYPE_TEXT                Billing Type                                 
    0CONSUMER_ATTR                 Consumer                                     
    0CONSUMER_LKLS_HIER            Consumer                                     
    0CONSUMER_TEXT                 Consumer                                     
    0CUST_CLASS_TEXT               Customer Classification                      
    0CUST_GROUP_TEXT               Customer Group                               
    0CUST_GRP1_TEXT                Customer Group 1                             
    0CUST_GRP2_TEXT                Customer Group 2                             
    0CUST_GRP3_TEXT                Customer Group 3                             
    0CUST_GRP4_TEXT                Customer Group 4                             
    0CUST_GRP5_TEXT                Customer Group 5                             
    0DEALTYPE_TEXT                 Sales Deal Type                              
    0DEL_BLOCK_TEXT                Delivery block (document header)             
    0DEL_TYPE_TEXT                 Delivery Type                                
    0DISTR_CHAN_TEXT               Distribution Channel                         
    0DIVISION_TEXT                 Division                                     
    0DLV_BLOCK_TEXT                Schedule line blocked for delivery           
    0DOC_CATEG_TEXT                SD Document Category                         
    0DOC_TYPE_TEXT                 Sales Document Type                          
    0INCOTERMS_TEXT                Incoterms (Part 1)                           
    0INDUSTRY_TEXT                 Industry keys                                
    0IND_CODE_3_TEXT               Industry code 3                              
    0IND_CODE_4_TEXT               Industry code 4                              
    0IND_CODE_5_TEXT               Industry code 5                              
    0IND_CODE_TEXT                 Industry code                                
    0ITEM_CATEG_TEXT               Sales document item category                 
    0ITM_TYPE_TEXT                 FS item type                                 
    0KHERK_TEXT                    Condition Origin                             
    0MATL_GRP_1_TEXT               Material Group1                                         
    0MATL_GRP_2_TEXT               Material Group 2                                         
    0MATL_GRP_3_TEXT               Material Group 3                                         
    0MATL_GRP_4_TEXT               Material Group 4                                         
    0MATL_GRP_5_TEXT               Material Group 5                                         
    0MATL_TYPE_TEXT                Material Type                                            
    0MAT_STGRP_TEXT                Material statistics group                                
    0NIELSEN_ID_TEXT               Nielsen ID                                               
    0ORD_REASON_TEXT               Order reason (reason for the business transaction)       
    0PICK_INDC_TEXT                Indicator for picking control                            
    0PRODCAT_TEXT                  Product Catalog Number                                   
    0PROD_HIER_TEXT                Product Hierarchy                                        
    0PROMOTION_ATTR                Promotion                                                
    0PROMOTION_TEXT                Promotion                                                
    0PROMOTYPE_TEXT                Promotion Type                                           
    0PROV_GROUP_TEXT               Commission Group                                         
    0REASON_REJ_TEXT               Reason for rejection of quotations and sales orders      
    0REBATE_GRP_TEXT               Volume rebate group                                      
    0RECIPCNTRY_TEXT               Destination country                                      
    0ROUTE_TEXT                          Route                                                    
    0SALESDEAL_ATTR                Sales deal                                               
    0SALESDEAL_TEXT                Sales deal                                               
    0SALESORG_ATTR                 Sales organization                                       
    0SALESORG_TEXT                 Sales Organization                                       
    0SALES_DIST_TEXT               Sales district                                           
    0SALES_GRP_TEXT                Sales Group                                              
    0SALES_OFF_TEXT                Sales Office                                             
    0SCHD_CATEG_TEXT               Schedule line category                                   
    0SHIP_POINT_TEXT               Shipping point/receiving point  
    In BW
    Base Unit of Measure     0BASE_UOM
    Bill-to party                    0BILLTOPRTY
    Calendar Day                  0CALDAY
    Calendar Year/Month      0CALMONTH
    Calendar Year/Week      0CALWEEK
    Change Run ID              0CHNGID
    Company code              0COMP_CODE  
    Cost in statistics currency          0COST_VAL_S
    Credit/debit posting (C/D)            0DEB_CRED
    Distribution Channel       0DISTR_CHAN
    Division                                     0DIVISION 
    Number of documents    0DOCUMENTS
    Sales Document Category          0DOC_CATEG
    Document category /Quotation/Order/Delivery/Invoice 0DOC_CLASS
    Number of Document Items         0DOC_ITEMS
    Fiscal year / period
    Fiscal year variant                      0FISCVARNT
    Gross weight in kilograms           0GR_WT_KG
    Number of Employees    0HDCNT_LAST
    Material                                     0MATERIAL
    Net value in statistics currency    0NET_VAL_S
    Net weight in kilograms 0NT_WT_KG
    Open orders quantity in base unit of measure 0OPORDQTYBM
    Net value of open orders in statistics currency 0OPORDVALSC
    Payer                            0PAYER
    Plant                             0PLANT
    Quantity in base units of measure 0QUANT_B
    Record type                   0RECORDTP
    Request ID                    0REQUID
    Sales Employee            0SALESEMPLY
    Sales Organization         0SALESORG
    Sales group                   0SALES_GRP
    Sales Office                   0SALES_OFF
    Shipping point                0SHIP_POINT
    Ship-To Party                0SHIP_TO
    Sold-to party                  0SOLD_TO
    Statistics Currency                    0STAT_CURR
    In R3 RSA5 we have all the Master data data sources as mentioned above, and BW also. How to find the related Master data Infosource in R/3 Master data Data sources.
    Thanks in advance,
       Bhima.
    Message was edited by: Bhima Chandra Sekhar Guntla

    Hi,
    <i>How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.</i>
    I think, you are looking for master data sources(text,attributes,hier).Am i right?
    If so, This cube has almost all SD master data characterstics. So you can activate all the all master data datasources of SD in r/3 (SD-IO).
    Any way you requirement does not stop only by using this cube . You will activate all other cubes in SD also. So if you want to activate only needed master data datasources when you are activating a cube, the job becomes senseless. There is no problem(wrong) in activating all master data available under that application , even though you want to activate only one cube.
    With rgds,
    Anil Kumar Sharma .P

  • ABAP QUERY PROGRAM OUTPUT SHOULD DISPLAY FROM SAP SCRIPT.

    THIS IS MY URGENT REQUIREMENT ...
    I DONT KNOW ABAP QUERY PROGRAM ..
    PLEASE SUGGEST ME A WAY ON THIS ....
    Functional requirements
    Introduction
    The wish of the customer is a printable customer overview. All desired fields will be shown in a new query called ZZADDRSS_CO. Double entries are taken for granted because of the data taken from the sales area and because of multiple contact persons. The customer accepts this. It should be made possible that the user creates and saves its own variant.
    A second overview is needed, another ABAP will be developed for this requirement. This ABAP will show all the customer data and this list will have the possibility to be printed.
    Solution
    New Query ZZADDRESS_CO
    The desired fields of attachment 1 need to be shown in the query.
    The selection criteria are shown in attachment 2.
    The column names of the additional data have to changed in the query.
    Customer Overview.
    Functional specification.
    On behalf of this customer overview a standard SAP transaction will be used (transaction VC/2).This transaction will be extended.
    The fields are shown on screen with the described headers. Printing of the overview will be done via SAP script. The script makes use of a fixed layout of the data.
    The selection criteria are specified in attachment 2.
    The layout of the customer overview and the SAP Script are specified in attachment 3.
    Specification.
    The next steps need to be performed.
    1.     A routine per infoblock need to be created in Include RV77UNNN. In this routine the data is retrieved and written down to the screen and script,
    Example LST1_901 . In include RV77SNNN you can find the standard infoblocks.
    2.     Adapt via transaction SE16 table TFRM.
    3.     Create a new view in the customizing (sales and distribution- Sales support-sales summary-Assign Reporting Views).Assign the new view to the infoblocks.(Example view 001 is assigned to block 901).
    4.     In customizing it is not possible to assign the correct window and element to the infoblock .so this is done via SE16 in table T182A.
    5.     Adapt script. Copy script SD-SALES-SUMMARY to a Z-SALES_SUMM.
    Assign this new version to the new view in customizing. Create in the main window the element who writes the data on behalf of the print.
    Attachment 1 Desired fields
    Header: Address
    ~ Customer number                          KNA1-KUNNR
    ~ Title                                               KAN1-ANRED
    ~ Name1                                           ADRC-NAME1
    ~ Name2                        ADRC-NAME2
    ~ Name3                                           ADRC-NAME3
    ~ Name4                                           ADRC-NAME4
    ~ PO Box                                         ADRC-PO_BOX
    ~ PO Box POSTAL CODE             ADRC-POST_CODE2
    ~ PO Box city                                  ADRC-PO_BOX_LOC
    ~ Telephone no1                              ADR2-TEL_NUMBER   1ST RECORD
    ~ Telephone no2                              ADR2-TEL_NUMBER   2ND RECORD
    ~ Fax number1                                 ADR3-FAX_NUMBER 1ST RECORD
    ~ Fax number2                                ADR3-FAX_NUMBER 2ND RECORD
    ~ E-mail                                            ADR6-SMTP_ADDR
    ~ Search item                                   ADRC-SORT1
    ~ Notes                                            ADRT-REMARK
    Header: control data
    ~ VAT registration number              KAN1-STCEG
    Header: Payment transactions
    ~Bank country key                         KNBK-BANKS
    ~Bank key                                      KNBK-BANKL
    ~Bank Account number                 KNBK-BANKN
    Header: Marketing
    ~ Industry key                                   KNA1-BRSCH
    ~ Industry code 1                              KNA1-BRAN1
    ~ Industry code 2                              KNA1-BRAN2
    ~ Industry code 3                                KNA1-BRAN3
    ~ Industry code 4                                KNA1-BRAN4
    ~ Industry code 5                               KNA1-BRAN5
    ~Annual sales, currency, year           KNA1-UMSA1, KNA1-UWAER, KNA1-UMAH
    ~ Yearly no of employees, year      KAN1-JMZAH, KNA1-JMJAH       
    ~ Fiscal year variant                          KNA1-PERIV
    ~Legal status                                      KNA1-GFORM
    Header: Correspondence
    ~ Our account number at customer            KNB1-EIKTO
    Header: sales
    ~ Sales office                                              KNVV-VKBUR
    ~ Customer group                                       KNVV-KDGRP
    ~ ABC-classification                                  KNVV-KLABC
    Header: Invoice
    ~Tax classification                          KNVI-TAXKD
    ~Terms of payment key                    KNVV-ZTERM
    ~
    Header: Contact Persons
    ~Title                                   KNVK-ANRED
    ~Name                                   KNVK-NAME1
    ~Advertising material                         KNVK-NMAIL
    ~Martial Status                         KNVK-FAMST
    ~Notes                                   KNVK-PARAU
    ~Function                              KNVK-PAFKT
    ~Department                              KNVK-ABTNR
    Header: Partnerroles
    ~Personnel Number                         KNVP-PERNR
    ~Name of employee                         PA0001-ENAME
    Header: Additional Data
    ~Attribute 1                              KNA1-KATR1
    ~Creation date                              KNA1-ERDAT
    ~Attribute 2                              KNA1-KATR2
    ~Change date of field KNA1-KATR2          CDHDR-UDATE
    ~Attribute 3                              KNA1-KATR3
    ~Attribute 4                              KNA1-KATR4          
    ~Attribute 5                              KNA1-KATR5
    ~Attribute 6                              KNA1-KATR6
    Attachment 2 Selection fields
    ~Customer number
    ~Sales office
    ~Personnel Number
    ~Sales Organization (default NL01)
    ~Industry key
    ~Industry codes (1 till 5)
    ~ABC- classification
    ~Creation date
    ~Attribute 1
    ~Attribute 2
    ~Attribute 3
    ~Attribute 4
    ~Attribute 5
    Attachment 3 Customer overview + SAP Script
    Customer master data sheet: 11490                 Page1
    Requested by karen Dunnewold                Date: 25.08.2004
    Address
    (Default SAP script ADDRESS statement)
    Title
    Name1
    Street + number
    PO Box city
    Country
    Search term: ADRC-SORT1
    Telephone 1:      ADR2-TEL_NUMBER     2: ADR2-TEL_NUMBER
    Fax 1:          ADR3-FAX_NUMBER     2: ADR3-FAX_NUMBER
    E-mail:          ADR6-SMTP_ADDR     
    Notes:           ADRT-REMARK
    PO BOX
    ADRC-PO_BOX
    ADRC-POST_CODE2 ADRC-PO_BOX_LOC
    T005T-LANDX (T005T-LAND1 = ADRC-COUNTRY)
    Control data
    VAT registration number:     KNA1-STCEG
    Payment transactions
    Country: KNBK-BANKS Bank-key: KNBK u2013 BANKL Bank account: KNBK-BANKN
    Marketing
    Industry           KNA1-BRSCH     Industry Description
    Industry code1          KNA1-BRAN1     Industry Description
    Industry code2          KNA1-BRAN2     Industry Description
    Industry code3          KNA1-BRAN3     Industry Description
    Industry code4          KNA1-BRAN4     Industry Description
    Industry code5          KNA1-BRAN5     Industry Description
    Figures
    Annual Sales          KNA1-UMSA1, KNA1-UWAER in KNA1-UMAH
    Employees          KNA1-JMZAH                         in KNA1-JMJAH
    Legal status            KNA1-GFORM description
    Customer master data sheet 11490                         Page 2
    Requested by karen Dunnewold                         Date: 25.08.2004
    Contact Persons
    KNVK-ANRED
    Mailings: KNVK-NMAIL           Notes: KNVK-PARAU
    KNVK-ANRED
    Mailings: KNVK-NMAIL           Notes: KNVK-PARAU
    Correspondence
    Our account number at customer      KNB1-EIKTO
    Sales
    Sales office          KNVV-VKBUR     Description
    Customer group     KNVV-KDGRP     Description
    ABC-classify          KNVV-KLABC
    Currency          KNVV-WAERS
    Invoice
    Terms of payment key KNVV-ZTERM      Tax classification KNV1-TAXKD
                                  Description     
    Partner (Leave SAP default)
    Partnerrole               Number          Name
    KNVP-PARVW          KNVP-KUNNR     NAME1
    KNVP-PARVW          KNVP-KUNNR     NAME1
    Additional data
    Attribute1          kna1-katr1     Description
    Attribute2          kna1-katr2     Description
    Attribute3          kna1-katr3     Description
    Attribute4          kna1-katr4     Description
    Attribute5          kna1-katr5     Description
    Attribute6          kna1-katr6     Description

    hi narayana
    i think u need to write a driving program and a provided with a smatform u sit along with the SD consultant.
    ur further views can be shared.
    Rgs,
    Venkat.

  • Warning Message:- Field BRSCH from structure CUSTOMER-CENTRAL_DATA-CENTRAL-DATA is provided by Business partner

    Hi Experts,
    I get this error when replication the Organization Unit created in transaction BP from CRM to ECC.
    The error is generated in ECC system and Error Class is CVI_EI.
    Any ideas.
    Kind Regards,
    Gaurav

    Hi Gaurav,
    The Business partner does not have 'industry Key' that is reason the warning msg is coming.
    BRSCH- Industry Field
    you can check this in structure 'CMDS_EI_VMD_CENTRAL_DATA ' which will be filled at run time and later validation happen in  Program 'Fill_customer_central' on it. You can set up breakpoint at line number 183 where the validation is failing and warning message is getting raised.
    Please assign point if above information helpful.:-)
    Thanks
    Prem

  • Required Shade column

    Hello Abap Gurus;
    I have a report of invoice list.In this report i want shade column
    of the SD document: Delivery: Item data in which the shade is displayed.I m attaching the code also.
    *& Report  ZRPT_SD_002
    REPORT  zrpt_sd_002 LINE-SIZE 70 NO STANDARD PAGE HEADING
                            MESSAGE-ID zcvs.
                              TABLES
    TABLES : vbak  ,              " Sales Document Header
             vbap  ,              " Sales Document Item
             kna1  ,              " Customer Master
             vbkd  ,              " Business Data
             t023t ,              " MAterial Group
             ekkn  ,
             mara ,
             lfa1,
             t134t ,              " Material Type
             t024d ,              " MAterial Controller
             t188t ,              " Zone
             tvkbt ,              " Sales OFfice Text
             tvaut ,              " Order Reason
             vbfa  ,              " Order Status
             vbep  ,              " Schedule Line Data
             mska  ,              " Sales Order Stock
             vbrp  ,              " Billing Header
             afko  ,              " Production Order
             vbrk  ,              " Billing Header
             konv  ,              " Condition Type Table
             likp  ,              " Delivery Header
             knb1  ,
             bkpf  ,
             cabnt , vttp,vttk,
             tvro,vbpa.
    TYPE-POOLS
    TYPE-POOLS : slis.
    VARIABLE DECLARATION
    DATA       : maktx  LIKE makt-maktx,
                 knttp  LIKE ekpo-knttp,
                 city1  LIKE adrc-city1,
                 tknum  LIKE vttk-tknum,
                 name1  LIKE lfa1-name1,
                 lzone  LIKE kna1-lzone,
                 mtbez  LIKE t134t-mtbez,
                 wgbez  LIKE t023t-wgbez,            " Material Group Text
                 bezei  LIKE tvaut-bezei,            " Order Reason Text
                 kvgr1  LIKE vbak-kvgr1,             " Product Manager
                 vtext  LIKE t188t-vtext,            " Product Manager Text
                 vtext2 LIKE t188t-vtext,            " Regional Mgnr Text
                 vtext3 LIKE t188t-vtext,            " Key Account Group
                 vtext4 LIKE t188t-vtext,            " Special Group
                 vtext5 LIKE t188t-vtext,            " Executive
                 vbezei LIKE tvkbt-bezei,            " Sales office
                 matkl  LIKE mara-matkl,             " Material Group
                 mtart  LIKE mara-mtart,             " Material Type
                 erdat  LIKE vbak-erdat,
                 audat  LIKE vbak-audat,
                 auart  LIKE vbak-auart,
                 bstkd  LIKE vbkd-bstkd,
                 prdha  LIKE mara-prdha,
                 belnr  LIKE bkpf-belnr,
                 text(30)   TYPE  c ,
                 v_tabix LIKE sy-tabix,
                 lifnr    LIKE lfa1-lifnr,
                 tname    LIKE lfa1-name1,
                 bstdk    LIKE vbkd-bstdk,
                 ordat    LIKE vbrk-erdat,
                 stext    LIKE tspat-vtext,
                 ktext    LIKE t151t-ktext,
                 v_brtxt  LIKE t016t-brtxt,
                 v_month  TYPE i,p_mon  TYPE i,
                 v_mname(20),p_mname(20),
                 v_ptext  LIKE t052u-text1.
    DATA : cl_data LIKE clobjdat OCCURS 0 WITH HEADER LINE.
    DATA : i_cl_data LIKE clobjdat OCCURS 0 WITH HEADER LINE.
    DATA :       dmbtr LIKE bseg-dmbtr,
                 gbsta LIKE vbup-gbsta,
                 mbdat LIKE vbep-mbdat,
                 kalab LIKE mska-kalab,
                 bonba LIKE vbrp-bonba,
                 gltrp LIKE afko-gltrp,
                 mblnr LIKE mseg-mblnr,
                 budat LIKE mkpf-budat,
                 prtext  LIKE t179t-vtext,
                 signi LIKE vttk-signi,       " Truck Number
                 landx LIKE t005t-landx.
    DATA :       BEGIN OF tline OCCURS 0 .
            INCLUDE STRUCTURE tline .
    DATA :       END OF tline .
    DATA :       soh LIKE rstxt-tdname ,
                 destcty(30).
    DATA :       klmeng LIKE  vbap-klmeng.
    DATA :       tabix  LIKE  sy-tabix.
    DATA :       cmgst  LIKE  vbuk-cmgst,
                 option(10) TYPE c .
    DATA : BEGIN OF delivery_header.
            INCLUDE STRUCTURE likp.
    DATA : END OF delivery_header.
    DATA : BEGIN OF shipment_header.
            INCLUDE STRUCTURE vttk.
    DATA : END OF shipment_header.
    DATA : BEGIN OF ivbrk OCCURS 0.
            INCLUDE STRUCTURE vbrk.
    DATA : brsch LIKE kna1-brsch,
           name1 LIKE kna1-name1,
           ort01  LIKE kna1-ort01.
    DATA : END OF ivbrk.
    DATA : v_regio LIKE kna1-regio,
           v_brsch LIKE kna1-brsch,
           v_ort01 LIKE kna1-ort01,
           v_land1  LIKE kna1-land1.
    New For Days Start
    DATA: len TYPE i.
    DATA : BEGIN OF head OCCURS 0,
           field(5),
           text(30),
           END OF head.
    DATA :   p_ftext1(30),
             p_ftext2(30),
             p_ftext3(30),
             p_ftext4(30),
             p_ftext5(30),
             p_ftext6(30).
    New For Days End
                          DECLARATION FOR ALV
    DATA: fieldtab TYPE slis_t_fieldcat_alv,
           heading  TYPE slis_t_listheader,
           layout   TYPE slis_layout_alv,
           events   TYPE slis_t_event,
           repname  LIKE sy-repid,
           f2code   LIKE sy-ucomm VALUE  '&ETA',
           g_save(1) TYPE c,
           g_variant LIKE disvariant,
           gx_variant LIKE disvariant,
           g_exit(1) TYPE c.
    DATA: keyinfo  TYPE slis_keyinfo_alv.
    CONSTANTS: formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
    DATA: alv_print        TYPE slis_print_alv.
    DATA: alv_detail_func(30).
    DATA: g_pos TYPE i.
    DATA: tabname   TYPE slis_tabname.
    INTERNAL TABLES DECLARATION
    DATA : BEGIN OF ivbeln OCCURS 1,
           vbeln    LIKE vbrk-vbeln,         " Billing Document
           posnr    LIKE vbrp-posnr,         " Billing Doc Item
           fkart    LIKE vbrk-fkart,         " Billing Type
           vbtyp    LIKE vbrk-vbtyp,         " SD Docnument Category
           vbtyp_desc(35)         ,          " Vbtyp description
           vkgrp    LIKE vbrp-vkgrp,         " Sales Group
           fkdat    LIKE vbrk-fkdat,         " Billing Date
           matnr    LIKE vbrp-matnr,         " Material
           arktx    LIKE vbrp-arktx,         " Material Desc
           kunnr    LIKE vbrk-kunag,         " Customer Code
           name1    LIKE kna1-name1,         " Customer Name
           ort01    LIKE kna1-ort01,         " Customer City
           fkimg    LIKE vbrp-fkimg,         " Billed Qty
           werks    LIKE vbrp-werks,         " Plant
           pl_land1 LIKE t001w-land1,        " Plant Country
           pl_regio LIKE t001w-regio,        " Plant Region Code
           regio_tx LIKE t005u-bezei,        " Plant Region Name
           netwr    LIKE vbrp-netwr,         " Net Price
           vkorg    LIKE vbrk-vkorg,         " Sales Organisation
           vtext    LIKE tvkot-vtext,        " Sales Org.Text
           vtweg    LIKE vbrk-vtweg,         " Distribution Channel
           vttxt    LIKE tvtwt-vtext,        " Dist.Channel Text
           vkbur    LIKE vbrp-vkbur,         " Sales Office
           vbezei   LIKE tvkbt-bezei,        " Sales Office Text
           spart    LIKE vbrp-spart,         " Division
           stext    LIKE tspat-vtext,        " Sales Division Text
           kvgr1    LIKE vbrp-kvgr1,         " District
           vtext1   LIKE tvv1t-bezei,        " District Name
           kvgr2    LIKE vbrp-kvgr2,         " Taluka
           vtext2   LIKE t188t-vtext,        " Taluka Name
           kvgr3    LIKE vbrp-kvgr3,         " Village
           vtext3   LIKE t188t-vtext,        " Village Name
           kvgr4    LIKE vbrp-kvgr4,         " Special Group
           vtext4   LIKE t188t-vtext,        " Special Group
           kvgr5    LIKE vbrp-kvgr5,         " Executive
           vtext5   LIKE t188t-vtext,        " Executive Text
          ZZLZONE  LIKE  VBAP-ZZLZONE ,     " Transport.Zone(Sold To Party)
           lztxt    LIKE  tzont-vtext,       " Trans.Zone Desc(Sold To Party)
           waerk    LIKE vbap-waerk,         " Document Currency
           inco1    LIKE vbkd-inco1,         " Inco Terms1
           inco2    LIKE vbkd-inco2,         " Inco Terms2
           bukrs    LIKE vbrk-bukrs,         " Company Code
           lgort    LIKE vbrp-lgort,         " Storage Loc
           vrkme    LIKE  vbrp-vrkme,        " Sales Unit
           aubel    LIKE  vbrp-aubel,        " Sales Doc
           aupos    LIKE  vbrp-aupos,        " Sales Doc Item
           audat    LIKE  vbak-audat,        " Sales Order Date
           klmeng   LIKE  vbap-klmeng,       " Sales Qty
           knumv    LIKE  konv-knumv,        " Cond.Doc No
           frate    LIKE  konv-kbetr,        " Rate
           fvalue   LIKE  konv-kwert,        " Value
           erate    LIKE  konv-kbetr,        " Excise Rate
           evalue   LIKE  konv-kwert,        " Excise Value
           kschl    LIKE  konv-kschl,        " Condition Type
           mtart    LIKE  mara-mtart,        " Material TYpe
           matkl    LIKE  mara-matkl,        " Material Group
           stceg    LIKE  vbrk-stceg,        " VAT Reg.No
           sfakn    LIKE  vbrk-sfakn,        " Cancelled Bill Doc No
           sfakn1   LIKE  vbrk-sfakn,        " Reversed Bill Doc No
           rfbsk    LIKE  vbrk-rfbsk,        " Accounting Transfer Status
           fksto    LIKE  vbrk-fksto,        " Bill Doc.Cancel Ind
           fksto_tx(60),                     " Bill Doc.Cancel text
           erdat    LIKE  vbrk-erdat,        " Creation Date
           erzet    LIKE  vbrk-erzet,        " Creattion Time
           regio    LIKE  kna1-regio,        " Region
           pstyv    LIKE  vbrp-pstyv,        " Sales Doc Item Cat.
           vgbel    LIKE  vbak-vgbel,        " Ref.Doc No
           vgpos    LIKE  vbap-vgpos,        " Ref.Doc.Item.No
           cmgst    LIKE  vbuk-cmgst,        " Credit Status
           zterm    LIKE  vbrk-zterm,        " Pay Term
           auart    LIKE  vbak-auart,        " Sales Order Type
           bstkd    LIKE  vbkd-bstkd,        " Cust.PO No
           bstdk    LIKE  vbkd-bstdk,        " Cust.PO Date
           mwsbp    LIKE  vbrp-mwsbp,        " Tax Amount
           belnr    LIKE  bkpf-belnr,        " Acc.Doc No
           kzwi1    LIKE  vbrp-kzwi1  ,      " Base Price
           kzwi2    LIKE  vbrp-kzwi2  ,      "
           kzwi3    LIKE  vbrp-kzwi3  ,      " Discounts
           kzwi4    LIKE  vbrp-kzwi4,        " Packing and forwarding
           kzwi5    LIKE  vbrp-kzwi5  ,      " Excise
           kzwi6    LIKE  vbrp-kzwi6  ,      " LST/ CST
           mtbez    LIKE  t134t-mtbez,       " Material Type Text
           wgbez    LIKE t023t-wgbez,        " Material Group Text
           land1    LIKE vbrk-land1,         " Country
           landx(20),                        " Country Text
           abrvw    LIKE tvlvt-abrvw,        " Usage Ind.
           reasn    LIKE tvlvt-bezei,        " Desc
           prdha    LIKE mara-prdha,         " Prod Hir.
           edg(2),
           char1    LIKE  ausp-atwrt ,       " Characteristic
           char2    LIKE  ausp-atwrt ,       " Characteristic
           char3    LIKE  ausp-atwrt ,       " Characteristic
           char4    LIKE  ausp-atwrt ,       " Characteristic
           char5    LIKE  ausp-atwrt ,       " Characteristic
           char6    LIKE  ausp-atwrt ,       " Characteristic
           char7    LIKE  ausp-atwrt ,       " Characteristic
           char8    LIKE  ausp-atwrt ,       " Characteristic
           char9    LIKE  ausp-atwrt ,       " Characteristic
           char10   LIKE ausp-atwrt ,        " Characteristic
           char11   LIKE ausp-atwrt ,        " Characteristic
           char12   LIKE ausp-atwrt ,        " Characteristic
           char13   LIKE ausp-atwrt ,        " Characteristic
           char14   LIKE ausp-atwrt ,        " Characteristic
           char15   LIKE ausp-atwrt ,        " Characteristic
           char16   LIKE ausp-atwrt ,        " Characteristic
           lifnr    LIKE lfa1-lifnr,         " Vendor
           tname    LIKE lfa1-name1,         " Vendor Name
           ordat    LIKE vbrk-fkdat,         " order Date
           charg    LIKE vbrp-charg,         " Batch
           kdgrp_auft LIKE vbrp-kdgrp_auft,  " Customer Sales Group
           ktext    LIKE t151t-ktext,        " Customer Sales Group Text
           signi    LIKE vttk-signi,         " License No
           route    LIKE likp-route,         " Route
           routid   LIKE tvro-routid,        " Route ID
           rt_bezei LIKE tvrot-bezei,        " Route Desc
           vstel    LIKE likp-vstel,         " Shipping Point
           sp_vtext LIKE tvstt-vtext,        " Ship Point Desc
           distz    LIKE v_tvro_com-distz,   " Distance
           brsch    LIKE kna1-brsch,         " Industry Key
           brtxt    LIKE t016t-brtxt,        " Industry Name
           mname    LIKE kna1-name1,         " Name
           exnum    LIKE j_1iexchdr-exnum,   " Ex.Number
           exdat    LIKE j_1iexchdr-exdat,   " Ex.Date
           exbed    LIKE j_1iexcdtl-exbed,   " Ex.BED Amt
           ecs      LIKE j_1iexcdtl-ecs,     " Ex.ECESS Amt
           expind   LIKE j_1iexchdr-expind,  " Export Ind.
           expind_desc LIKE dd07t-ddtext,    " Export Ind.Desc
           exgrp    LIKE j_1iexchdr-exgrp,   " Exc.Group
           srgrp    LIKE j_1iexchdr-srgrp,   " Series Group
           sanum    LIKE vbap-vbeln,         " Sales Order No
           sapos    LIKE vbap-posnr,         " SO Item No
           tknum    LIKE vttk-tknum,         " Shipment No
           exti1    LIKE vttk-exti1,         " Vehicle Number
           exti2    LIKE vttk-exti2,         " Driver Name
           tr_count TYPE i,                  " Truck Count
           vsart    LIKE vttk-vsart,         " Shipment Type
           st_bezei LIKE t173t-bezei,        " Shipment Type Desc
           zb00     LIKE konv-kbetr,         " Basic Rate
           xcpdk    LIKE vbpa-xcpdk,         " One Time Account
           adrnr    LIKE vbpa-adrnr,         " Address Number
           shpcd    LIKE kna1-kunnr,         " Ship to Party
           shpnm    LIKE kna1-name1,         " Ship to Party Name
           sh_regio LIKE kna1-regio,         " Region(SH)
           sh_land1 LIKE kna1-land1,         " Country
          SH_LZONE LIKE  VBAP-ZZLZONE ,     " Transport.Zone(Ship To Party)
           sh_lztxt LIKE  tzont-vtext,       " Trans.Zone Desc(Ship To Party)
           mblnr    LIKE mseg-mblnr,         " Material Doc No
           budat    LIKE mkpf-budat,         " Doc Date
           konda    LIKE vbrk-konda,         " Sales Zone
           ptext    LIKE t188t-vtext,        " Text
           zrbat    LIKE konv-kwert,         " Rebate Amount
           serdt    LIKE vbak-erdat,         " S.A Create Date
           groes    LIKE mara-groes,         " Size/Dimensions
           dtext(20),                        "
           prodt(20),                        "
           mtext(20),                        "
           prdqy    LIKE vbrp-fkimg,         "
           aufnr    LIKE afko-aufnr,         " Order No
           city1    LIKE adrc-city1,         " City
           packno(3),                        " Pack No
           inv_rate LIKE konv-kbetr,         " Inv Rate
           inv_amt  LIKE konv-kwert,         " Inv Amount
           frt_rate LIKE konv-kbetr,         " Frt Rate
           frt_amt  LIKE konv-kwert,         " Frt Amount
           td_fkimg LIKE vbrp-fkimg,         " Trade Inv.Qty
           nt_fkimg LIKE vbrp-fkimg,         " Non-Trade Inv.Qty
           st_fkimg LIKE vbrp-fkimg,         " Stk.Trsf.Inv.Qty
           tot_fkimg LIKE vbrp-fkimg,        " Total
           or_dl_vbeln  LIKE lips-vbeln,     " Original Delivery
           or_dl_posnr  LIKE lips-posnr,     " Original Del.Item
           or_in_vbeln  LIKE vbrp-vbeln,     " Original Invoice
           or_in_fkdat  LIKE vbrk-fkdat,     " Original Inv.Date
           or_in_posnr  LIKE vbrp-posnr,     " Original Inv.Item
           or_in_knumv  LIKE vbrk-knumv,     " Original Inv.Cond.No
           or_in_frt_amt LIKE konv-kwert,    " Original Frt Amount
           or_in_fkimg   LIKE vbrp-fkimg,    " Original Qty
           diff_date  TYPE  p,               " Date Differance
           pfield1      LIKE vbrp-fkimg,                        " Day 1
           pfield2      LIKE vbrp-fkimg,                        " Day 2
           pfield3      LIKE vbrp-fkimg,                        " Day 3
           pfield4      LIKE vbrp-fkimg,                        " Day 4
           pfield5      LIKE vbrp-fkimg,                        " Day 5
           pfield6      LIKE vbrp-fkimg,     " Above Days
           pfield7      LIKE vbrp-fkimg,     " TOTAL DAYS
           bolnr        LIKE likp-bolnr,    " LR/DC No
           INCLUDE STRUCTURE ZSD_MATGROUPS.  " Inc.For Mat.Groups
           chaname TYPE lfa1-name1,
           lcnum  TYPE vbkd-lcnum,
           tdline TYPE tline-tdline,
           docno  type j_1iexchdr-docno.
    DATA:  END   OF ivbeln.
    DATA  : BEGIN OF i_mat_tab OCCURS 0,
            dtext LIKE ivbeln-dtext,
            prodt(20),
            mtext(20),
            name1 LIKE ivbeln-name1,
            kunnr LIKE ivbeln-kunnr,
            fkimg LIKE ivbeln-fkimg,
            END OF i_mat_tab.
    DATA  : BEGIN OF it_vbtyp OCCURS 0.
            INCLUDE STRUCTURE dd07v.
    DATA  : END OF it_vbtyp.
    DATA  : BEGIN OF i_mseg OCCURS 0.
            INCLUDE STRUCTURE mseg.
    DATA  : END OF i_mseg.
    DATA  : BEGIN OF i_mseg_coll OCCURS 0,
            matnr  LIKE mseg-matnr,
            charg  LIKE mseg-charg,
            menge  LIKE mseg-menge,
            aufnr  LIKE mseg-aufnr,
            werks  LIKE mseg-werks,
            END OF i_mseg_coll.
    *-- For Sales Plan Details
    DATA  : exnum    LIKE j_1iexchdr-exnum,
            exdat    LIKE j_1iexchdr-exdat,
            exbed    LIKE j_1iexchdr-exbed,
            expind   LIKE j_1iexchdr-expind,
            exgrp    LIKE j_1iexchdr-exgrp,
            srgrp    LIKE j_1iexchdr-srgrp,
            shpcd    LIKE kna1-kunnr,
            shpnm    LIKE kna1-name1,
            shreg    LIKE kna1-regio,
            shlnd    LIKE kna1-land1,
            xcpdk    LIKE vbpa-xcpdk,
            adrnr    LIKE vbpa-adrnr,
            sanum    LIKE vbap-vbeln,
            serdt    LIKE vbak-erdat,
            ptext    LIKE t188t-vtext,
            sapos    LIKE vbap-posnr.
    DATA  : BEGIN OF iitem OCCURS 1,
            kunnr LIKE ivbeln-kunnr,
            name1 LIKE ivbeln-name1,
            vkbur LIKE ivbeln-vkbur,
            vbezei LIKE ivbeln-vbezei,
            dtext LIKE tvtwt-vtext,
            matnr LIKE ivbeln-matnr,
            arktx LIKE ivbeln-arktx,
           VTWEG LIKE ZCVI_VBRKVBRP-VTWEG,
            land1 LIKE kna1-land1,
            landx LIKE t005t-landx,
            END OF iitem.
    DATA  : BEGIN OF t_konv OCCURS 0,
            knumv LIKE konv-knumv,
            kposn LIKE konv-kposn,
            krech LIKE konv-krech,
            kwert LIKE konv-kwert,
            kbetr LIKE konv-kbetr,
            kawrt LIKE konv-kawrt,
            kschl LIKE konv-kschl,
            END OF t_konv.
    DATA  : kunnr LIKE kna1-name1,
            pdate LIKE sy-datum,
            frate LIKE konv-kbetr,
            erate LIKE konv-kbetr,
            evalue LIKE konv-kwert,
            fvalue LIKE konv-kwert,
            zwels LIKE knb1-zwels.
    *DATA  : BEGIN OF ISDCHAR OCCURS 0 .
           INCLUDE STRUCTURE ZCTA_SDCHAR .
    *DATA    END   OF ISDCHAR .
    DATA  : BEGIN OF it_char OCCURS 0.
    DATA  : tabix(2)     TYPE c,
            atbez(30),
            descrp(30)   TYPE c.
            INCLUDE STRUCTURE vbmuez.
    DATA  : END   OF it_char.
    DATA  : ichar LIKE sel_char OCCURS 0 WITH HEADER LINE.
    DATA  : reasn   LIKE tvlvt-bezei.
                          FIELD-SYMBOLS                                  *
    FIELD-SYMBOLS : <table>    TYPE  table ,
                    <struc> ,
                    <field> ,
                    <component> .
    Data Declaration for Dynamic Assignment                              *
    DATA : alv_fieldcat    TYPE                 slis_t_fieldcat_alv,
           lt_alv_cat      TYPE TABLE OF        lvc_s_fcat,
           it_fieldcat     LIKE LINE  OF        lt_alv_cat.
    DATA : i_table         TYPE REF   TO        data,
           i_structure     TYPE REF   TO        data.
    DATA : new_tabix  LIKE sy-tabix.
    DATA : v_ebeln LIKE ekkn-ebeln ,
           v_ebelp LIKE ekkn-ebelp ,
           groes   LIKE mara-groes.
    DATA : t_char LIKE sel_char OCCURS 0 WITH HEADER LINE.
         Macro Definition for assigning and unassigning component
    Assign a field to a component and component to a structure
    DEFINE assign_component.
      assign &1 to <component>.
      assign component <component> of structure <struc> to <field>.
    END-OF-DEFINITION.
    Unassign a Component.
    DEFINE unassign_field.
      if &1 is assigned.
        unassign &1.
      endif.
    END-OF-DEFINITION.
                    SELECTION - SCREEN
    *For ALV Variant
    SELECTION-SCREEN BEGIN OF BLOCK d WITH FRAME TITLE text-s01.
    PARAMETERS: p_vari LIKE disvariant-variant. " ALV Variant
    SELECTION-SCREEN END OF BLOCK d.
    For Basic Data
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-s02.
    SELECT-OPTIONS: s_kunnr FOR vbrk-kunrg MATCHCODE OBJECT debi,
                    s_vbeln FOR vbrk-vbeln MATCHCODE OBJECT vmva,
                    s_fkdat FOR vbrk-fkdat OBLIGATORY,
                    s_matnr FOR vbrp-matnr MATCHCODE OBJECT mat1,
                    s_fkart FOR vbrk-fkart ,
                    s_pstyv FOR vbap-pstyv,
                    s_spart FOR vbrk-spart.
    SELECTION-SCREEN END OF BLOCK a.
    For Organisational Data
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-s03.
    SELECT-OPTIONS: s_vkorg FOR vbrk-vkorg,
                    s_vtweg FOR vbrk-vtweg,
                    s_bukrs FOR vbrk-bukrs,
                    s_vkbur FOR vbrp-vkbur,
                    s_regio FOR kna1-regio,
                    s_werks FOR vbrp-werks,
                    s_brsch FOR kna1-brsch.         " Industry Key
    SELECTION-SCREEN END OF BLOCK b.
    NEW ADDED  BY AJAY 22-06-2006
    SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-d01.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) text-d02.
    SELECTION-SCREEN POSITION 32.
    PARAMETERS : p_field1(3) TYPE n DEFAULT '001',
                 p_field2(3) TYPE n DEFAULT '005',
                 p_field3(3) TYPE n DEFAULT '007',
                 p_field4(3) TYPE n DEFAULT '009',
                 p_field5(3) TYPE n DEFAULT '015'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK c.
    NEW ADDED END BY AJAY 22-06-2006
                          INITIALIZATION
    INITIALIZATION.
      repname = sy-repid.
      PERFORM build_eventtab USING events[].
      PERFORM build_layout .
      PERFORM initialize_variant.
                          AT SELECTION-SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM f4_for_variant.
    AT SELECTION-SCREEN.
      PERFORM pai_of_selection_screen.
      PERFORM check_input.
                          START OF SELECTION
    START-OF-SELECTION.
      PERFORM build_comment USING heading[].
      PERFORM get_day_label.
      PERFORM get_data.
      PERFORM segregate_dist_chann_qty.
      PERFORM initialise_fieldtab.
      PERFORM attach_char_to_fieldcat.
      PERFORM get_transporter_data.
      PERFORM get_sd_matgroups.
      PERFORM get_plant_from_po.
      PERFORM get_excise_details.
      PERFORM display_data.
                          END OF SELECTION
    END-OF-SELECTION.
                              FORMS
    *&      Form  get_data
    *&      Extracts data as per the users selection criteria.
    FORM get_data.
      DATA domname LIKE dd07v-domname.
      DATA it_vrpma LIKE vrpma OCCURS 0 WITH HEADER LINE.
    In case Doc No is specified in Selection use VBRK
    Else use VRPMA(Material wise Billing Doc)
      IF NOT s_vbeln IS INITIAL.
        SELECT * FROM vbrk CLIENT SPECIFIED
                           INTO CORRESPONDING FIELDS OF TABLE ivbrk
                           WHERE mandt EQ sy-mandt
                                 AND   vbeln IN s_vbeln
                                 AND   fkart IN s_fkart
                                 AND   fkdat IN s_fkdat
                                 AND   kunag IN s_kunnr
                                 AND   vkorg IN s_vkorg
                                 AND   vtweg IN s_vtweg
                                 AND   bukrs IN s_bukrs
                                 AND   rfbsk NE 'E'
                                 AND   sfakn EQ space
                                 AND   fksto EQ space.
      ELSE.
        SELECT * FROM vrpma CLIENT SPECIFIED
                            INTO CORRESPONDING FIELDS OF TABLE it_vrpma
                            WHERE mandt EQ sy-mandt
                                  AND  matnr IN s_matnr
                                  AND  vkorg IN s_vkorg
                                  AND  fkdat IN s_fkdat
                                  AND  vtweg IN s_vtweg
                                  AND  fkart IN s_fkart
                                  AND  kunag IN s_kunnr
                                  AND  fkart NE 'ZCMR'
                                  AND  vbeln IN s_vbeln.
        CHECK NOT it_vrpma[] IS INITIAL.
        SORT it_vrpma BY vbeln.
        SELECT * FROM vbrk INTO CORRESPONDING FIELDS OF TABLE ivbrk
                           FOR ALL ENTRIES IN it_vrpma
                           WHERE vbeln = it_vrpma-vbeln
                                 AND   rfbsk NE 'E'
                                 AND   sfakn EQ space
                                 AND   fksto EQ space.
      ENDIF.
      domname = 'VBTYP'.
    Get the List of all Document Types
      PERFORM get_domtext TABLES it_vbtyp USING domname.
      IF NOT ivbrk[] IS INITIAL.
        SORT ivbrk BY kunag.
        LOOP AT ivbrk.
          v_tabix = sy-tabix.
    Get the Region,Industry Key, Name for Sold To Party
          ON CHANGE OF ivbrk-kunag.
            CLEAR : v_regio,v_brsch,name1,v_ort01,v_land1.
            SELECT SINGLE regio brsch name1 ort01 land1 FROM kna1
                                      CLIENT SPECIFIED
                                      INTO (v_regio,v_brsch,
                                            name1,v_ort01,v_land1 )
                                      WHERE mandt = sy-mandt
                                            AND kunnr = ivbrk-kunag.
          ENDON.
    Check for Region,Industry Key as per the Parameter
          IF NOT s_regio[] IS INITIAL.
            IF NOT v_regio IN s_regio.
              DELETE ivbrk INDEX v_tabix.
              CONTINUE.
            ENDIF.
          ENDIF.
          IF NOT s_brsch[] IS INITIAL.
            IF NOT v_brsch IN s_brsch.
              DELETE ivbrk INDEX v_tabix.
              CONTINUE.
            ENDIF.
          ENDIF.
          ivbrk-regio = v_regio.
          ivbrk-brsch = v_brsch.
          ivbrk-name1 = name1.
          ivbrk-ort01 = v_ort01.
          ivbrk-land1 = v_land1.
          ivbrk-netwr = 0.
          MODIFY ivbrk TRANSPORTING regio brsch
                                    name1 netwr ort01 land1.
          CLEAR  ivbrk.
        ENDLOOP.
    Get the Invoice Details from VBRP Table
        IF NOT ivbrk[] IS INITIAL.
          SELECT * FROM vbrp CLIENT SPECIFIED
                           INTO CORRESPONDING FIELDS OF TABLE ivbeln
                           FOR ALL ENTRIES IN ivbrk
                           WHERE mandt = sy-mandt
                                 AND vbeln = ivbrk-vbeln
                                 AND fkimg NE 0
                                 AND matnr IN s_matnr
                                 AND pstyv IN s_pstyv
                                 AND spart IN s_spart
                                 AND werks IN s_werks
                                 AND vkbur IN s_vkbur.
        ENDIF.
      ENDIF.
      IF NOT ivbeln[] IS INITIAL.
        LOOP AT ivbeln.
          READ TABLE ivbrk WITH KEY vbeln = ivbeln-vbeln.
          IF sy-subrc EQ 0.
            IF ivbrk-netwr IS INITIAL.
              ivbrk-netwr = ivbeln-netwr.
            ENDIF.
            MOVE-CORRESPONDING ivbrk TO ivbeln.
            CLEAR it_vbtyp.
            READ TABLE it_vbtyp WITH KEY domvalue_l = ivbrk-vbtyp.
            ivbeln-vbtyp_desc = it_vbtyp-ddtext.
            MOVE ivbrk-kunag TO ivbeln-kunnr.
            MODIFY ivbeln .
            CLEAR  ivbeln.
          ENDIF.
        ENDLOOP.
        SORT ivbeln BY vbeln posnr.
        DELETE ADJACENT DUPLICATES FROM ivbeln COMPARING ALL FIELDS.
        CLEAR  ivbeln.
    Get the Material Type, Group and Production Hiearchy
        LOOP AT ivbeln.
          ON CHANGE OF ivbeln-matnr.
            CLEAR : mtart,matkl,prdha.
            SELECT SINGLE  mtart matkl prdha FROM mara CLIENT SPECIFIED
                                 INTO (mtart,matkl,prdha)
                                 WHERE mandt EQ sy-mandt
                                       AND matnr EQ ivbeln-matnr.
          ENDON.
          ivbeln-mtart = mtart.
          ivbeln-matkl = matkl.
          ivbeln-prdha = prdha.
          MODIFY ivbeln TRANSPORTING  mtart matkl prdha.
          CLEAR ivbeln.
        ENDLOOP.
        LOOP AT ivbeln.
    Retrieving Sales Order Date ,Customer PO No,Customer PO Date
          ON CHANGE OF ivbeln-aubel.
            CLEAR : bstkd,bstdk,ordat,audat.
            SELECT SINGLE bstkd bstdk  FROM vbkd
                                  CLIENT SPECIFIED
                                  INTO  (bstkd,bstdk)
                                  WHERE mandt EQ sy-mandt
                                        AND vbeln EQ ivbeln-aubel.
            SELECT SINGLE erdat audat FROM  vbak CLIENT SPECIFIED
                                INTO  (ordat,audat)
                                WHERE mandt = sy-mandt
                                      AND vbeln = ivbeln-aubel.
           In case of Stock Transfer, Or Export Excise GP
           SO is really a PO Hence Date is tajken from EKKO
            IF ivbeln-fkart EQ 'ZSTF' OR ivbeln-fkart EQ 'ZSTE'.
              SELECT SINGLE bedat FROM  ekko CLIENT SPECIFIED
                                INTO  (audat)
                                WHERE mandt = sy-mandt
                                      AND ebeln = ivbeln-aubel.
            ENDIF.
          ENDON.
          IF ivbeln-erzet GE '000000' AND ivbeln-erzet LE '070000'.
            ivbeln-erdat = ivbeln-erdat - 1.
          ENDIF.
    Get the Counry Descripion
          ON CHANGE OF ivbeln-land1.
            CLEAR : landx.
            SELECT SINGLE landx INTO landx FROM t005t
                               WHERE land1 EQ ivbeln-land1
                                     AND  spras EQ  sy-langu.
          ENDON.
    For retrieving text for Customer Group
          ON CHANGE OF ivbeln-kdgrp_auft.
            CLEAR : ktext.
            SELECT SINGLE ktext FROM t151t
                                INTO ktext
                                WHERE spras EQ sy-langu
                                AND   kdgrp EQ ivbeln-kdgrp_auft.
          ENDON.
    For Retrieving texts for KVGR1 KVGR2 KVGR3 KVGR4 KVGR5
          ON CHANGE OF ivbeln-kvgr1.
            CLEAR : vtext.
            SELECT SINGLE bezei INTO vtext FROM tvv1t
                                           WHERE kvgr1 EQ ivbeln-kvgr1
                                                 AND spras EQ sy-langu.
          ENDON.
          ON CHANGE OF ivbeln-kvgr2.
            CLEAR :vtext2.
            SELECT SINGLE bezei INTO vtext2 FROM tvv2t
                                           WHERE kvgr2 EQ ivbeln-kvgr2
                                                 AND spras EQ sy-langu.
          ENDON.
          ON CHANGE OF ivbeln-kvgr3.
            CLEAR :vtext3.
            SELECT SINGLE bezei INTO vtext3 FROM tvv3t
                                           WHERE kvgr3 EQ ivbeln-kvgr3
                                                 AND spras EQ sy-langu.
          ENDON.
          ON CHANGE OF ivbeln-kvgr4.
            CLEAR :vtext4.
            SELECT SINGLE bezei INTO vtext4 FROM tvv4t
                                           WHERE kvgr4 EQ ivbeln-kvgr4
                                                 AND spras EQ sy-langu.
          ENDON.
          ON CHANGE OF ivbeln-kvgr5.
            CLEAR : vtext5.
            SELECT SINGLE bezei INTO vtext5 FROM tvv5t
                                           WHERE kvgr5 EQ ivbeln-kvgr5
                                                 AND spras EQ sy-langu.
          ENDON.
    Get the Description for Usage Indicator
          ON CHANGE OF ivbeln-abrvw.
            CLEAR : reasn.
            SELECT SINGLE bezei INTO reasn FROM tvlvt CLIENT SPECIFIED
                                           WHERE mandt = sy-mandt
                                                 AND abrvw EQ ivbeln-abrvw
                                                 AND spras EQ sy-langu.
          ENDON.
    Get Account Document
          ON CHANGE OF ivbeln-vbeln.
            CLEAR : belnr.
            SELECT SINGLE belnr INTO belnr FROM bkpf
                                     CLIENT SPECIFIED
                                           WHERE mandt = sy-mandt
                                             AND awtyp EQ 'VBRK'
                                             AND awkey EQ ivbeln-vbeln.
          ENDON.
    Get Division Text
          ON CHANGE OF ivbeln-spart.
            CLEAR : stext.
            SELECT SINGLE vtext INTO stext FROM tspat
                                           WHERE spart EQ ivbeln-spart
                                            AND spras EQ sy-langu.
          ENDON.
    Get Price group Text
          ON CHANGE OF ivbeln-konda.
            CLEAR : ptext.
            SELECT SINGLE vtext INTO ptext FROM t188t
                                           WHERE konda EQ ivbeln-konda
                                            AND spras EQ sy-langu.
          ENDON.
    Get Transporter Code ,Name
          ON CHANGE OF ivbeln-vbeln.
            CLEAR : lifnr,name1.
            SELECT SINGLE lifnr INTO lifnr FROM vbpa
                                           WHERE vbeln EQ ivbeln-vbeln
                                                 AND parvw EQ 'V1'.
            IF NOT lifnr IS INITIAL.
              SELECT SINGLE name1 FROM lfa1 INTO name1
                                            WHERE lifnr EQ lifnr.
            ENDIF.
    *Ship To party Details
            CLEAR: shpcd,shpnm,city1,kna1,xcpdk,adrnr.
            SELECT SINGLE kunnr xcpdk adrnr
                          INTO (shpcd,xcpdk,adrnr)
                          FROM vbpa
                          WHERE vbeln EQ ivbeln-vbeln
                                AND   parvw EQ 'WE'.
            IF NOT shpcd IS INITIAL.
              IF xcpdk EQ 'X'.
                SELECT SINGLE name1 city1 transpzone region country
                          FROM adrc
                          INTO (shpnm,city1,lzone,shreg,shlnd)
                              WHERE addrnumber EQ adrnr.
              ELSE.
                SELECT SINGLE name1 ort01 lzone regio land1
                          FROM kna1
                          CLIENT SPECIFIED
                          INTO (shpnm,city1,lzone,shreg,shlnd)
                              WHERE mandt = sy-mandt
                              AND kunnr EQ shpcd.
              ENDIF.
            ENDIF.
          ENDON.
    Retrieve Text for Sales Office
          ON CHANGE OF ivbeln-vkbur.
            CLEAR : vbezei.
            SELECT SINGLE bezei FROM tvkbt
                                INTO vbezei
                                WHERE spras EQ sy-langu
                                AND   vkbur EQ ivbeln-vkbur.
          ENDON.
    Retrieve Text for Industry Key
          ON CHANGE OF ivbeln-brsch.
            CLEAR : v_brtxt.
            SELECT SINGLE brtxt FROM t016t
                                INTO v_brtxt
                                WHERE spras EQ sy-langu
                                AND   brsch EQ ivbeln-brsch.
          ENDON.
    Retrieve Text for Payment Terms
          ON CHANGE OF ivbeln-zterm.
            CLEAR : v_ptext.
            SELECT SINGLE text1 FROM t052u
                                INTO v_ptext
                                WHERE spras EQ sy-langu
                                AND   zterm EQ ivbeln-zterm.
          ENDON.
    Get Material Type Description,Material Group Desc
          ON CHANGE OF ivbeln-mtart OR ivbeln-matkl.
            CLEAR : wgbez,mtbez.
            SELECT SINGLE wgbez FROM t023t
                               INTO wgbez
                               WHERE spras EQ sy-langu
                               AND   matkl EQ ivbeln-matkl.
            SELECT SINGLE mtbez FROM t134t
                                INTO mtbez
                                WHERE spras EQ sy-langu
                                AND   mtart EQ ivbeln-mtart.
          ENDON.
    Get Delivery doc Number.
          SELECT SINGLE vbeln erdat FROM vbfa INTO
                                    (mblnr,budat)
                                    WHERE vbelv = ivbeln-vgbel
                                    AND   posnv = ivbeln-vgpos
                                    AND    vbtyp_n = 'R'.
          CLEAR : exnum,exdat.
    Get the Excise Related Data
          SELECT SINGLE exnum exdat FROM j_1iexchdr CLIENT SPECIFIED
                                    INTO (exnum,exdat)
                                    WHERE  mandt = sy-mandt
                                           AND  trntyp = 'DLFC'
                                           AND  rdoc   = ivbeln-vbeln
                                           AND  rind   = 'N'
                                           AND  status = 'C'.
          IF sy-subrc = 0.
            SELECT SINGLE exbed ecs INTO (ivbeln-exbed,ivbeln-ecs)
                                    FROM j_1iexcdtl
                                    CLIENT SPECIFIED
                                          WHERE mandt = sy-mandt
                                            AND rdoc2 = ivbeln-vbeln
                                            AND ritem2 = ivbeln-posnr.
            IF sy-subrc NE 0.
              ivbeln-exbed = 0.
              CLEAR ivbeln-exnum.
            ENDIF.
          ENDIF.
    Read Characteristics
          IF NOT ichar[] IS INITIAL.
            PERFORM  read_characteristics   TABLES   ichar
                                            USING    ivbeln-we

    I have solved my query....

  • CONFUSE

    Hello,
    i am having big confusion about the mandatory fields of fico tables, i asked the question regarding the same in expert somebody told me that mandatory fields are already clikmark in the filed of key/intial there i am having doubt that ok some fileds are already cliked in the field and rest of the fields are uncliked i can understood that the cliked fields are already in the master table and rest of the user have to enter that field then how to know the which fields are mandatory i mean uncliked fields i.e. key/initial.
    also sending the screenshort for one table there the key/intial fields are cliked in top of the two coloums i can understood that are already loaded in the master table again user not necessary to enter that, i want to know rest of the fileds which are mandatory that i want to know, please help me soon and oblige.
    TABLE: LFA1 (Vendor Master (General Section)                              
    FIELD     Key     Initial     DATAELEMENT     DTYPE     LENGTH
    MANDT     &#8730;     &#8730;     MANDT     CLNT     3     Client
    LIFNR     &#8730;     &#8730;     LIFNR     CHAR     10     Account Number of Vendor or Creditor
    LAND1               LAND1_GP     CHAR     3     Country Key
    NAME1               NAME1_GP     CHAR     35     Name 1
    NAME2               NAME2_GP     CHAR     35     Name 2
    NAME3               NAME3_GP     CHAR     35     Name 3
    NAME4               NAME4_GP     CHAR     35     Name 4
    ORT01               ORT01_GP     CHAR     35     City
    ORT02               ORT02_GP     CHAR     35     District
    PFACH               PFACH     CHAR     10     PO Box
    PSTL2               PSTL2     CHAR     10     P.O. Box Postal Code
    PSTLZ               PSTLZ     CHAR     10     Postal Code
    REGIO               REGIO     CHAR     3     Region (State, Province, County)
    SORTL               SORTL     CHAR     10     Sort field
    STRAS               STRAS_GP     CHAR     35     House number and street
    ADRNR               ADRNR     CHAR     10     Address
    MCOD1               MCDK1     CHAR     25     Search term for matchcode search
    MCOD2               MCDK2     CHAR     25     Search term for matchcode search
    MCOD3               MCDK3     CHAR     25     Search term for matchcode search
    .INCLUDE               SI_LFA1     STRU     0     Vendor Master (General Section)
    ANRED               ANRED     CHAR     15     Title
    BAHNS               BAHNS     CHAR     25     Train station
    BBBNR               BBBNR     NUMC     7     International location number  (part 1)
    BBSNR               BBSNR     NUMC     5     International location number (Part 2)
    BEGRU               BEGRU     CHAR     4     Authorization Group
    BRSCH               BRSCH     CHAR     4     Industry key
    BUBKZ               BUBKZ     NUMC     1     Check digit for the international location number
    DATLT               DATLT     CHAR     14     Data communication line no.
    DTAMS               DTAMS     CHAR     1     Report key for data medium exchange
    DTAWS               DTAWS     CHAR     2     Instruction key for data medium exchange
    ERDAT               ERDAT_RF     DATS     8     Date on which the Record Was Created
    ERNAM               ERNAM_RF     CHAR     12     Name of Person who Created the Object
    ESRNR               ESRNR     CHAR     11     POR subscriber number
    KONZS               KONZS     CHAR     10     Group key
    KTOKK               KTOKK     CHAR     4     Vendor account group
    KUNNR               KUNNR     CHAR     10     Customer Number 1
    LNRZA               LNRZA     CHAR     10     Account Number of the Alternative Payee
    LOEVM               LOEVM_X     CHAR     1     Central Deletion Flag for Master Record
    SPERR               SPERB_X     CHAR     1     Central posting block
    SPERM               SPERM_X     CHAR     1     Centrally imposed purchasing block
    SPRAS               SPRAS     LANG     1     Language Key
    STCD1               STCD1     CHAR     16     Tax Number 1
    STCD2               STCD2     CHAR     11     Tax Number 2
    STKZA               STKZA     CHAR     1     Indicator: Business Partner Subject to Equalization Tax?
    STKZU               STKZU     CHAR     1     Liable for VAT
    TELBX               TELBX     CHAR     15     Telebox number
    TELF1               TELF1     CHAR     16     First telephone number
    TELF2               TELF2     CHAR     16     Second telephone number
    TELFX               TELFX     CHAR     31     Fax Number
    TELTX               TELTX     CHAR     30     Teletex number
    TELX1               TELX1     CHAR     30     Telex number
    XCPDK               XCPDK     CHAR     1     Indicator: Is the account a one-time account?
    XZEMP               XZEMP     CHAR     1     Indicator: Alternative payee in document allowed ?
    VBUND               RASSC     CHAR     6     Company ID of Trading Partner
    FISKN               FISKN_K     CHAR     10     Account number of the master record with fiscal address
    STCEG               STCEG     CHAR     20     VAT registration number
    STKZN               STKZN     CHAR     1     Natural Person
    SPERQ               QSPERRFKT     CHAR     2     Function That Will Be Blocked
    GBORT               GBORT_Q     CHAR     25     Place of birth of the person subject to withholding tax
    GBDAT               GBDAT_Q     DATS     8     Date of birth of the person subject to withholding tax
    SEXKZ               SEXKZ     CHAR     1     Key for the *** of the Person Subject to Withholding Tax
    KRAUS               KRAUS_CM     CHAR     11     Credit information number
    REVDB               REVDB_CM     DATS     8     Last review (external)
    QSSYS               QSSYS_IST     CHAR     4     Vendor's QM system
    KTOCK               KTOCK     CHAR     4     Reference Account Group for One-Time Account (Vendor)
    PFORT               PFORT_GP     CHAR     35     PO Box city
    WERKS               WERKS_EXT     CHAR     4     Plant (Own or External)
    LTSNA               LTSNA     CHAR     1     Indicator: vendor sub-range relevant
    WERKR               WERKR     CHAR     1     Indicator: plant level relevant
    PLKAL               FABKL     CHAR     2     Factory calendar key
    DUEFL               DUEFL_BKPF     CHAR     1     Status of Data Transfer into Subsequent Release
    TXJCD               TXJCD     CHAR     15     Jurisdiction for Tax Calculation - Tax Jurisdiction Code
    SPERZ               SPERZ     CHAR     1     Payment Block
    SCACD               SCACD     CHAR     4     Standard carrier access code
    SFRGR               SFRGR     CHAR     4     Forwarding agent freight group
    LZONE               LZONE     CHAR     10     Transportation zone to or from which the goods are delivered
    XLFZA               XLFZA     CHAR     1     Indicator: Alternative payee using account number
    DLGRP               DLGRP     CHAR     4     Service agent procedure group
    FITYP               J_1AFITP_D     CHAR     2     Tax type
    STCDT               J_1ATOID     CHAR     2     Tax Number Type
    REGSS               J_1AREGSS     CHAR     1     Registered for Social Insurance
    ACTSS               J_1AACTSS     CHAR     3     Activity Code for Social Insurance
    STCD3               STCD3     CHAR     18     Tax Number 3
    STCD4               STCD4     CHAR     18     Tax Number 4
    IPISP               J_1BINDEQU     CHAR     1     Tax Split
    TAXBS               TAXBS     NUMC     1     Tax Base in Percentage
    PROFS               PROFS     CHAR     30     Profession
    STGDL               STGDL     CHAR     2     Shipment: statistics group, transportation service agent
    EMNFR               EMNFR     CHAR     10     External manufacturer code name or number
    LFURL               URL     CHAR     132     Uniform resource locator
    J_1KFREPRE               REPRES     CHAR     10     Name of Representative
    J_1KFTBUS               GESTYP     CHAR     30     Type of Business
    J_1KFTIND               INDTYP     CHAR     30     Type of Industry
    CONFS               CONFS_X     CHAR     1     Status of Change Authorization (Central)
    UPDAT               UPDAT_RF     DATS     8     Date on Which the Changes Were Confirmed
    UPTIM               UPTIM_RF     TIMS     6     Time of Last Change Confirmation
    NODEL               NODEL_X     CHAR     1     Central deletion block for master record
    QSSYSDAT               QQSSYSDAT     DATS     8     Validity date of certification
    PODKZB               PODKZB     CHAR     1     Vendor indicator relevant for proof of delivery
    FISKU               FISKU     CHAR     10     Account Number of Master Record of Tax Office Responsible
    STENR               STENR     CHAR     18     Tax Number at Responsible Tax Authority
    .APPEND               ALFA1_PSO     STRU     0     Local Authority Additional Fields (Address)
    PSOFG               PSOFG     CHAR     10     Processor group
    PSOIS               PSOIS     CHAR     20     Subledger acct preprocessing procedure
    .INCLUDE               IADDR_PSO     STRU     0     Local Authority Additional Fields (Address)
    PSON1               NAME1_GP     CHAR     35     Name 1
    PSON2               NAME2_GP     CHAR     35     Name 2
    PSON3               NAME3_GP     CHAR     35     Name 3
    PSOVN               PSOVN     CHAR     35     First name
    PSOTL               PSOTL     CHAR     20     Title
    PSOHS               PSOHS     CHAR     6     House number: is no longer used from Release 4.6B
    PSOST               PSOST     CHAR     28     Street: No longer used from Release 4.6B

    hi
    u click on the entry help/check
    after that some table name r there,just click on the tables that r appeared so theat fileds is key fields for another table,so u may use that as key mandatory fields..in u r program..
    not  all fields according to u r requirement u sue that fields

  • Change document  - Workflow Event Container value not passed

    Hi Iam working on a customer create notification scenario where in we are sending a notification to SAP Inbox whenever a customer is created.We are checking industry key(KNA1-BRSCH) value through a check function module.When the customer is created in the system the system triggers the corresponding even it gets in to check module and an exception is raised saying Industry key does not have any value.
    Problem is Industry key value is not passed on to the container.
    Where might be the problem...?
    Is anything missing in SWEC(Events for change document)
    -but the event is trigerred...container value for industry key not passed...
    Please advice...
    Thanks in advance!

    Refer to link below.
    Sandy

  • BPM 1:n mapping

    Hi all,
    I am doing a BPM for 1:n multimapping.
    Start->receive idoc->Transformation->send asynchronous->Stop.
    In the transformation, I have a source message and two target messages. I want to send this message as a single message to the receiving MQ system.
    In the send asynchronous step after transformation, I can give only one message for sending. Can anyone suggest some solution for this?
    Thanks in advance,
    Deno

    Hi,
    If you follow Siva suggestion you will altering the XSD of the IDoc itself. I feel its better you enclose both messages in a separate root tag.
    Also when merging, you should use Message Type XSD of your custom strcuture and not Data Type XSD of your custom structure.
    The following is an example of a merged custom XSD and IDoc XSD:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="MergedMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="resultset" type="resultset" />
    <xsd:element name="CREMAS03">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="IDOC" type="CREMAS.CREMAS03"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="CREMAS03">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="IDOC" type="CREMAS.CREMAS03"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:complexType name="CREMAS03.E1LFA1M">
              <xsd:annotation>
                   <xsd:documentation>
                   Segment for general vendor data
                   </xsd:documentation>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="MSGFN" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Function
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="3"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="LIFNR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Account number of vendor or creditor
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ANRED" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Title
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="15"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="BAHNS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Train station
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="25"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="BBBNR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             International location number  (part 1)
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="7"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="BBSNR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             International location number (part 2)
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="5"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="BEGRU" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Authorization group
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="BRSCH" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Industry key
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="BUBKZ" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Check digit for the international location number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="DATLT" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Data communication line no.
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="14"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="DTAMS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Report key for data medium exchange
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="DTAWS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Instruction key for data medium exchange
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="2"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ERDAT" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Date on which the Record Was Created
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="8"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ERNAM" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Name of Person who Created the Object
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="12"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ESRNR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             POR subscriber number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="11"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="KONZS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Group key
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="KTOKK" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Vendor account group
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="KUNNR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Customer number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="LAND1" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Country of company
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="3"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="LNRZA" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Account number of vendor or creditor
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="LOEVM" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Central Deletion Flag for Master Record
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="NAME1" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Employee&apos;s last name
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="NAME2" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Employee&apos;s last name
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="NAME3" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Employee&apos;s last name
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="NAME4" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Employee&apos;s last name
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ORT01" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             City
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ORT02" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             District
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="PFACH" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             P.O. Box
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="PSTL2" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Postal Code
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="PSTLZ" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Postal Code
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="REGIO" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Region (State, Province, County)
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="3"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SORTL" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Character field length = 10
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SPERR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Central posting block
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SPERM" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Centrally imposed purchasing block
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SPRAS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Language key
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STCD1" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Tax number 1
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="16"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STCD2" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Tax number 2
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="11"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STKZA" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: Business Partner Subject to Equalization Tax?
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STKZU" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: Business partner subject to tax on sales/purch. ?
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STRAS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             House number and street
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TELBX" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Telebox number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="15"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TELF1" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             First telephone number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="16"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TELF2" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Second telephone number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="16"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TELFX" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Fax number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="31"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TELTX" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Teletex number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="30"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TELX1" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Telex number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="30"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="XCPDK" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: Is the account a one-time account?
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="XZEMP" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: Alternative payee in document allowed ?
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="VBUND" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Company ID of trading partner
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="6"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="FISKN" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Account number of the master record with fiscal address
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STCEG" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             VAT registration number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="20"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="STKZN" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: Is business partner a natural person?
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SPERQ" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Function That Will Be Blocked
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="2"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="ADRNR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Address
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="10"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="MCOD1" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Search term for matchcode search
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="25"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="MCOD2" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Search term for matchcode search
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="25"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="MCOD3" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Search term for matchcode search
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="25"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="GBORT" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Place of birth of the person subject to withholding tax
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="25"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="GBDAT" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Date of Birth
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="8"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SEXKZ" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Key for the *** of the Person Subject to Withholding Tax
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="KRAUS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Credit information number
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="11"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="REVDB" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Last review (external)
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="8"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="QSSYS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Vendor&apos;s QM system
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="KTOCK" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Reference Account Group for One-Time Account (Vendor)
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="PFORT" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             PO Box city
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="35"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="WERKS" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Plant
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="LTSNA" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: vendor sub-range relevant
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="WERKR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Indicator: plant level relevant
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="PLKAL" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Factory calendar key
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="2"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="DUEFL" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Status of Data Transfer into Subsequent Release
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="1"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="TXJCD" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Jurisdiction for tax calculation - tax jurisdiction code
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="15"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SCACD" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Standard carrier access code
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:maxLength value="4"/>
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="SFRGR" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation>
                             Forwarding agent freight group
                             </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:rest

  • Customer Group wise credit limit

    Dear Gurus,
    Please inform the process of maintaining credit limit based on customer group. In the customer master we have customer group  feild in sales data used for grouping based on industry type and in general data control data we have customer group which can be used as well, can any one inform the difference between these two in the credit management usage.
    Thanks
    Srinivas

    Hi,
               I am not sure about maintaining Credit Limit based on a customer Group.The mere purpose of the customer Group is to Identify a particular group of customers (for example, wholesale or
    retail) for the purpose of pricing or generating statistics. Where as  An industry is a distinct group of companies with the same basic  business activity. The industry key is used in selecting data for
    evaluations (for example, a vendor master data list). You can specify  industries such as trade, banking, service, manufacturing, health care,  public service, media and so on. Credit Management will be based on the following Criteria.
    credit Group assigned to the sales document type
    Risk category
    Customer Credit Limit.
    Kindly please let me know If you need any more Information.
    Regards
    Ram Pedarla

  • Logististics issue--one vendor code is supplier & provides services too.

    Hi all-
    We are LSP company & have recently implement ECC6.0--an issue has cropped up.
    how can i maintain only one vendor code( his address details,income tax number,service tax number are the same) who provides services and is also my supplier--what account group ,GL,reco AND what partner functions are to be assigned?
    pl send me solution(s) so that I can test and productionise....
    << Moderator message -The answers in the forum are provided by volunteers. Please do not ask for help "promptly". >>.
    warm regards--
    A.VENKAT KRISHNAN
    HEAD (I.T./SAP)
    Edited by: Rob Burbank on Nov 7, 2011 11:40 AM

    Hi Alex,
    Have you checked Industry key (LFA1-BRSCH) in Vendor master data control tab.
    I hope you can use this field as same for your requirement.
    Best Regards,
    Kishore

  • Type of Supplier in Vendor Master

    Dear All,
    Can we maintain the type of supplier (Manufacturer, Dealer, Distributer, Trader) i the vendor master.
    Regards,
    Manish Jain

    Hi
    There is field in the Control View of vendor Master > Refernce data subscreen - Field name is Industry- where you  make entry .
    Industry key
    An industry is a distinct group of companies with the same basic business activity. The industry key is used in selecting data for evaluations (for example, a vendor master data list). You can specify industries such as trade, banking, service, manufacturing, health care, public service, media and so on.
    The industry field belongs to the general data area of customer and vendor master records.
    You can define industry key based on your requirement. and can also fetch report based on these keys.

  • Function module to pricing procedure calculation

    hi,
    I want to know whether any function modules available to get as I see in  Invoice ->
    select item level conditions.
    Where i can see the basic price ,discount, etc as defined in the corresponding pricing procedure.
    i have tried with
    RV_INVOICE_PRICE_PBO
    PRICING_SUBSCREEN_SET_DATA
    here i get only the records which have condition type,
    similarly for P.O. we have
    ME_SWP_SIC_GET_PRICING_INFO
    regards,
    Prabhu
    Points assured.

    REPORT  zmm_pvr.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     TYPE-POOLS                                          *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TYPE-POOLS slis.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       TABLES                                            *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TABLES: mara,                         " General Material Data
            marc,                         " Plant Data for Material
            ekko,                         " Purchasing Document Header
            ekpo,                         " Purchasing Document Item
            lfa1,                         " Vendor Master (General Section)
            konv,                         " Conditions (Transaction Data)
            mbew,                         " Material Valuation
            makt.                         " Material Descriptions
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    DATA DECLARATION                                     *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    DATA: BEGIN OF i_mat OCCURS 1,
            matnr LIKE mara-matnr,
            mtart LIKE mara-mtart,
            werks LIKE marc-werks,
            abcin LIKE marc-abcin,
          END OF i_mat.
    DATA: BEGIN OF itab OCCURS 1,
            ebeln LIKE ekko-ebeln,
            bedat LIKE ekko-bedat,
            lifnr LIKE ekko-lifnr,
            waers LIKE ekko-waers,
            bukrs LIKE ekko-bukrs,
            ekorg LIKE ekko-ekorg,
            name1 LIKE lfa1-name1,
            werks LIKE ekpo-werks,
            menge LIKE ekpo-menge,
            meins LIKE ekpo-meins,
            netpr LIKE ekpo-netpr,
            netwr LIKE ekpo-netwr,
            menge1(16),
            netpr1(16),
            menge2  TYPE string,
            netpr2 TYPE string,
            lrate TYPE p DECIMALS 2,
            stax LIKE ekpo-netwr,
            exbed LIKE ekpo-netwr,
            dcost LIKE konv-kwert,
            nomvl LIKE ekpo-netwr,
            nomrt LIKE ekpo-netwr,
            zplp1 LIKE mbew-zplp1,
            verpr LIKE mbew-verpr,
            bgval LIKE ekpo-netwr,
            varnc LIKE ekpo-netwr,
            maktx LIKE makt-maktx,
            knumv LIKE ekko-knumv,
            ebelp LIKE ekpo-ebelp,
            matnr LIKE ekpo-matnr,
            matkl LIKE ekpo-matkl,
            mtart LIKE ekpo-mtart,
            bprme LIKE ekpo-bprme,
            txz01 LIKE ekpo-txz01,
            mwskz LIKE ekpo-mwskz,
            prdat LIKE ekpo-prdat,
          END OF itab.
    DATA: wtab LIKE itab.
    DATA: v_steuc TYPE marc-steuc.
    DATA: v_brsch TYPE lfa1-brsch.
    DATA: wa_komk TYPE komk.
    DATA: wa_komp TYPE komp.
    DATA: it_komv TYPE TABLE OF komv.
    DATA: wa_komv TYPE komv.
    DATA : wa_fieldcat TYPE  slis_fieldcat_alv,
           gt_fieldcat TYPE  slis_t_fieldcat_alv,
           wa_layout   TYPE  slis_layout_alv,
           lt_sort     TYPE  slis_t_sortinfo_alv,
           i LIKE sy-tabix.
    DATA: gt_events     TYPE slis_t_event.
    DATA: gd_prntparams TYPE slis_print_alv.
    DATA: it_color TYPE   slis_t_specialcol_alv.
    DATA: wa_color TYPE   slis_specialcol_alv.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          Begin Of Selection Screen                      *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    SELECTION-SCREEN BEGIN OF BLOCK pas WITH FRAME TITLE text-001.
    SELECT-OPTIONS s_matnr FOR  ekpo-matnr.
    SELECT-OPTIONS s_werks FOR  ekpo-werks.
    SELECT-OPTIONS s_bedat FOR  ekko-bedat.
    PARAMETERS     p_abcin LIKE marc-abcin OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK pas.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           INITIALIZATION                                *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    INITIALIZATION.
      IF sy-datum+4(2) GE 4.
        s_bedat-low+6(2) = 01.
        s_bedat-low+4(2) = 04.
        s_bedat-low(4) = sy-datum(4).
      ENDIF.
      IF sy-datum+4(2) LT 4.
        s_bedat-low+6(2) = 01.
        s_bedat-low+4(2) = 04.
        s_bedat-low(4) = sy-datum(4) - 1.
      ENDIF.
      s_bedat-high   = sy-datum.
      APPEND s_bedat.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        AT Selection Screen Output                       *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    AT SELECTION-SCREEN.
    Check for Material Type
      SELECT amatnr amtart bwerks babcin INTO CORRESPONDING FIELDS OF TABLE i_mat
      FROM mara AS a INNER JOIN marc AS b
           ON amatnr = bmatnr
      WHERE a~matnr IN s_matnr
        AND ( amtart = 'IRAM' OR amtart = 'IPAM' OR amtart = 'PRAM' OR amtart = 'PPAM' )
        AND b~werks IN s_werks
        AND b~abcin = p_abcin.
      SORT i_mat BY matnr werks.
      CHECK NOT i_mat[] IS INITIAL.
      READ TABLE i_mat INDEX 1.
      IF sy-subrc <> 0.
        MESSAGE e006(zmm).
        LEAVE LIST-PROCESSING.
      ENDIF.
    Check for Date
      IF ( s_bedat-low IS INITIAL AND s_bedat-high IS INITIAL ).
        s_bedat-sign   = 'I'.
        s_bedat-option = 'BT'.
        IF sy-datum+4(2) GE 4.
          s_bedat-low+6(2) = 01.
          s_bedat-low+4(2) = 04.
          s_bedat-low(4) = sy-datum(4).
        ENDIF.
        IF sy-datum+4(2) LT 4.
          s_bedat-low+6(2) = 01.
          s_bedat-low+4(2) = 04.
          s_bedat-low(4) = sy-datum(4) - 1.
        ENDIF.
        s_bedat-high   = sy-datum.
      ELSEIF ( s_bedat-low IS NOT INITIAL AND s_bedat-high IS INITIAL ).
        s_bedat-low6(2) = s_bedat-low6(2).
        s_bedat-low4(2) = s_bedat-low4(2).
        s_bedat-low(4)   = s_bedat-low(4).
      ELSEIF ( s_bedat-low IS NOT INITIAL AND s_bedat-high IS NOT INITIAL ).
        s_bedat-sign   = 'I'.
        s_bedat-option = 'BT'.
        s_bedat-low6(2) = s_bedat-low6(2).
        s_bedat-low4(2) = s_bedat-low4(2).
        s_bedat-low(4)   = s_bedat-low(4).
        s_bedat-high6(2) = s_bedat-high6(2).
        s_bedat-high4(2) = s_bedat-high4(2).
        s_bedat-high(4)   = s_bedat-high(4).
      ENDIF.
      APPEND s_bedat.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            START OF SELECTION                           *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    START-OF-SELECTION.
    *----- Get all PO for given selection criteria.
    LOOP AT i_mat.
      SELECT
        aebeln abedat alifnr aknumv awaers abukrs a~ekorg
        bebelp bmatnr bmatkl bnetpr bbprme btxz01 bwerks bmenge bmeins bnetwr bmtart bmwskz b~prdat
      FROM ( ekko AS a INNER JOIN ekpo AS b ON  amandt = bmandt AND aebeln = bebeln )
      INTO CORRESPONDING FIELDS OF TABLE itab
      FOR ALL ENTRIES IN i_mat
      WHERE a~bedat IN s_bedat
       AND  a~loekz = ''
       AND  b~matnr = i_mat-matnr
       AND  b~werks = i_mat-werks
       AND  b~loekz = ''
       AND  b~pstyp = '0'
       AND  b~bstyp = 'F'
       AND  b~knttp = ''.
    ENDLOOP.            " END OF i_mat
      CHECK NOT itab[] IS INITIAL.
      SORT itab BY ebeln ebelp.
    *----- Calculating The DCOST -- Delivery Cost
      DATA: BEGIN OF i_konv OCCURS 0,
             knumv LIKE konv-knumv,
             kposn LIKE konv-kposn,
             stunr LIKE konv-stunr,
             zaehk LIKE konv-zaehk,
             kschl LIKE konv-kschl,
             kbetr LIKE konv-kbetr,
             kwert LIKE konv-kwert,
           END OF i_konv.
      SELECT knumv kposn stunr zaehk kschl kbetr kwert
      FROM konv
      INTO CORRESPONDING FIELDS OF TABLE i_konv
      FOR ALL ENTRIES IN itab
      WHERE knumv = itab-knumv
       AND kposn = itab-ebelp
        AND ( kschl   = 'ZFC3' OR kschl   = 'ZQIQ'
           OR kschl   = 'ZQIV' OR kschl   = 'ZFA3'
           OR kschl   = 'ZFB3' OR kschl   = 'ZPF2'
           OR kschl   = 'ZPQ2' OR kschl   = 'ZPV2'
           OR kschl   = 'ZOCP' OR kschl   = 'ZOCQ'
           OR kschl   = 'ZOCV' OR kschl   = 'ZMT1'
           OR kschl   = 'ZIN2' OR kschl   = 'ZIQ2'
           OR kschl   = 'ZIV2' OR kschl   = 'ZBK1'
           OR kschl   = 'ZBKQ' OR kschl   = 'ZBKV' ).
      SORT i_konv BY knumv kposn stunr zaehk kschl .
      DELETE ADJACENT DUPLICATES FROM i_konv.
      DELETE i_konv WHERE kbetr = 0.
      DATA: BEGIN OF i_knumv OCCURS 0,
              knumv LIKE konv-knumv,
              kwert LIKE konv-kwert,
            END OF i_knumv.
      LOOP AT i_konv.
        MOVE i_konv-knumv TO i_knumv-knumv.
        MOVE i_konv-kwert TO i_knumv-kwert.
        COLLECT i_knumv.
      ENDLOOP.
      CLEAR i_konv.
      CLEAR i_knumv.
      LOOP AT itab INTO wtab.
        READ TABLE i_knumv WITH KEY knumv = wtab-knumv.
        IF sy-subrc = 0.
          wtab-dcost = i_knumv-kwert.
          MODIFY itab FROM wtab.
        ENDIF.
      ENDLOOP.
      CLEAR i_knumv.
      CLEAR itab.
    *----- Get the vendor name.
      LOOP AT itab.
        SELECT SINGLE name1 FROM lfa1 INTO itab-name1
                                        WHERE lifnr = itab-lifnr.
        MODIFY itab INDEX sy-tabix TRANSPORTING name1.
      ENDLOOP.
    *----- Calculate Excise Duty, Educat. cess, Sec edu. cess, sales tax
      CLEAR: wa_komk, wa_komp.
    Selecting The Value Of STEUC (Controlling Code)
      CLEAR itab.
      LOOP AT itab.
        SELECT SINGLE steuc
          FROM marc
          INTO v_steuc
         WHERE matnr = itab-matnr
           AND werks = itab-werks.
    Selecting The Value Of BRSCH (Industry key)
        SELECT SINGLE brsch
          FROM lfa1
          INTO v_brsch
         WHERE lifnr = itab-lifnr.
    Filling KOMK (Header Structure)
        wa_komk-kappl     = 'TX'.
        wa_komk-kalsm     = 'TAXINN'.
        wa_komk-lifnr     = itab-lifnr.
        wa_komk-waerk     = itab-waers.
        wa_komk-aland     = 'IN'.
        wa_komk-hwaer     = 'INR'.
        wa_komk-bukrs     = itab-bukrs.
        wa_komk-brsch     = v_brsch.
        wa_komk-prsdt     = itab-bedat.
        wa_komk-ekorg     = itab-ekorg.
        wa_komk-mwskz     = itab-mwskz.
    Filling KOMP (Details Structure)
        wa_komp-kposn     = itab-ebelp.
        wa_komp-matnr     = itab-matnr.
        wa_komp-werks     = itab-werks.
        wa_komp-matkl     = itab-matkl.
        wa_komp-meins     = itab-meins.
        wa_komp-vrkme     = itab-bprme.
        wa_komp-netwr     = itab-netwr.
        wa_komp-wrbtr     = itab-netwr.
        wa_komp-mwskz     = itab-mwskz.
        wa_komp-netpr     = itab-netpr.
        wa_komp-mtart     = itab-mtart.
        wa_komp-kursk_dat = itab-prdat.
        wa_komp-steuc     = v_steuc.
        wa_komp-mgame     = itab-menge.
        wa_komp-mglme     = itab-menge.
        FREE it_komv.
    Calling The Pricing Function To Get GR EXCISE, GR ECES, GR VAT/CST
        CALL FUNCTION 'PRICING'
          EXPORTING
            calculation_type = 'B'
            comm_head_i      = wa_komk
            comm_item_i      = wa_komp
          TABLES
            tkomv            = it_komv.
    Calculating The Excise --excise duty
        DATA: l_kbetr        TYPE komv-kbetr.
        DATA: l_gr_excise    TYPE ekpo-brtwr.
        DATA: l_basic_gr_val TYPE ekpo-netpr.
        l_basic_gr_val = itab-netwr.
        CLEAR: l_kbetr, l_gr_excise.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'JMOP'
                                        OR kschl = 'JAOP'
                                        OR kschl = 'JMIP'
                                        OR kschl = 'JAOQ'.
          l_kbetr     = ( wa_komv-kbetr / 10 ).
          l_gr_excise = ( l_kbetr * l_basic_gr_val ) / 100.
        ENDLOOP.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'JAIP'
                                        OR kschl = 'JAIQ'
                                        OR kschl = 'JMIQ'
                                        OR kschl = 'JMOQ'.
          l_gr_excise = ( wa_komv-kbetr * l_basic_gr_val ).
        ENDLOOP.
    Calculating The ECES -- Educational Cess
        DATA l_gr_eces      TYPE ekpo-netpr.
        CLEAR: l_kbetr, l_gr_eces.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'ZECE'
                                        OR kschl = 'ZECN'.
          l_kbetr     = ( wa_komv-kbetr / 10 ).
          l_gr_eces   = ( l_kbetr * l_gr_excise ) / 100.
        ENDLOOP.
    Calculating The SECES -- Sec. Educational Cess
        DATA l_gr_secs      TYPE ekpo-netpr.
        CLEAR: l_kbetr, l_gr_secs.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'JSEP'
                                        OR kschl = 'JSEI'.
          l_kbetr     = ( wa_komv-kbetr / 10 ).
          l_gr_secs   = ( l_kbetr * l_gr_excise ) / 100.
        ENDLOOP.
    Calculating The VAT/CST --Sales Tax
        DATA l_gr_vatcst    TYPE ekpo-netpr.
        CLEAR: l_kbetr, l_gr_vatcst.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'JVRN'
                                        OR kschl = 'JVRD'
                                        OR kschl = 'JVCS'
                                        OR kschl = 'JVCD'
                                        OR kschl = 'JVCN'
                                        OR kschl = 'JIPS'
                                        OR kschl = 'JIPC'
                                        OR kschl = 'JIPL'.
          l_kbetr     = ( wa_komv-kbetr / 10 ).
          l_gr_vatcst = ( ( l_basic_gr_val + l_gr_excise + l_gr_eces + l_gr_secs ) * l_kbetr ) / 100.
        ENDLOOP.
    Calculating The NOMVL & NOMVR -- NOM Value (Setoff / Inventory ) & NOM Rate
        DATA: l_netpr TYPE ekpo-netpr,
              l_menge TYPE ekpo-menge,
              l_dcost TYPE ekpo-netwr,
              l_nomvl TYPE ekpo-netwr,
              l_nomrt TYPE ekpo-netwr.
        l_netpr = itab-netpr.
        l_menge = itab-menge.
        l_dcost = itab-dcost.
        CLEAR: l_nomvl, l_nomrt.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'JMOP'                        "------setoff
                                        OR kschl = 'ZECE'
                                        OR kschl = 'JSEP'.
          l_nomvl = ( l_netpr * l_menge ) + l_gr_vatcst + l_dcost - ( l_gr_excise + l_gr_eces + l_gr_secs ).
          l_nomrt =  l_nomvl / l_menge.
        ENDLOOP.
        LOOP AT it_komv INTO wa_komv WHERE kschl = 'JMIP'                        "-------inventory
                                        OR kschl = 'ZECN'
                                        OR kschl = 'JSEI'.
          l_nomvl = ( l_netpr * l_menge ) + l_gr_vatcst + l_dcost.
          l_nomrt =  l_nomvl / l_menge.
        ENDLOOP.
        itab-exbed = l_gr_excise + l_gr_eces + l_gr_secs.
        itab-stax  = l_gr_vatcst.
        itab-nomvl = l_nomvl.
        itab-nomrt = l_nomrt.
        MODIFY itab .
        CLEAR itab.
      ENDLOOP.           " end of itab
      LOOP AT itab WHERE exbed = 0.
        itab-nomvl = ( itab-netpr * itab-menge ) + itab-stax + itab-dcost.
        itab-nomrt = itab-nomvl / itab-menge.
        MODIFY itab INDEX sy-tabix TRANSPORTING nomvl nomrt.
      ENDLOOP.
    *----- Calculating The Budget Rate, Moving Average Price, Landed Rate & Material Description
      DATA: verp(15).
      DATA: matdes(40).
      LOOP AT itab.
        SELECT SINGLE zplp1 FROM mbew INTO itab-zplp1
                                        WHERE matnr = itab-matnr AND bwkey = itab-werks.
        SELECT SINGLE verpr FROM mbew INTO itab-verpr
                                        WHERE matnr = itab-matnr AND bwkey = itab-werks.
        itab-lrate = itab-netwr / itab-menge.
        SELECT SINGLE maktx FROM makt INTO itab-maktx
                                        WHERE matnr = itab-matnr AND spras = 'EN'.
        MODIFY itab INDEX sy-tabix TRANSPORTING zplp1 verpr lrate maktx.
        verp = itab-verpr.
        matdes = itab-maktx.
      ENDLOOP.
    *----- Calculating The Budget Value & Variance
      LOOP AT itab.
        itab-bgval = itab-zplp1 * itab-menge.
        itab-varnc = itab-bgval - itab-nomvl.
        MODIFY itab INDEX sy-tabix TRANSPORTING bgval varnc.
      ENDLOOP.
    *------ Calculating Total of Quantity
      DATA: BEGIN OF i_quan OCCURS 1,
               quant LIKE ekpo-menge,
               unit LIKE ekpo-meins,
               nomvl LIKE ekpo-netwr,
               curr LIKE ekko-waers,
               varnc LIKE ekpo-netwr,
               bgval LIKE ekpo-netwr,
             END OF i_quan.
      LOOP AT itab.
        MOVE itab-menge TO i_quan-quant.
        MOVE itab-meins TO i_quan-unit.
        MOVE itab-nomvl TO i_quan-nomvl.
        MOVE itab-waers TO i_quan-curr.
        MOVE itab-varnc TO i_quan-varnc.
        MOVE itab-bgval TO i_quan-bgval.
        COLLECT i_quan.
      ENDLOOP.
      CLEAR itab.
      CLEAR i_quan.
      DATA: qty(15).
      DATA: unt(3).
      DATA: wtd TYPE p DECIMALS 2.
      DATA: wtd2(15).
      DATA: cur(3).
      DATA: var(15).
      DATA: nomvl(15).
      DATA: bgval(15).
      DATA: bgv TYPE p DECIMALS 2.
      DATA: bgv2(15).
      LOOP AT i_quan.
        qty = i_quan-quant.
        unt = i_quan-unit.
        cur = i_quan-curr.
        var = i_quan-varnc.
        bgval = i_quan-bgval.
        nomvl = i_quan-nomvl.
        wtd = nomvl / qty.
        bgv = bgval / qty.
      ENDLOOP.
      CLEAR i_quan.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          DATA DISPLAY                                   *
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      wa_fieldcat-fieldname  = 'EBELN'.
      wa_fieldcat-seltext_l  = 'Purchase Order'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 1.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'BEDAT'.
      wa_fieldcat-seltext_l  = 'PO Date'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 2.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'NAME1'.
      wa_fieldcat-seltext_l  = 'Vendor Name'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 3.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'WERKS'.
      wa_fieldcat-seltext_l  = 'Plant'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 4.
      APPEND wa_fieldcat TO gt_fieldcat.
    wa_fieldcat-fieldname  = 'MENGE2'.
      wa_fieldcat-fieldname  = 'MENGE'.
      wa_fieldcat-seltext_l  = 'Quantity'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 5.
      wa_fieldcat-do_sum     = 'X'.
      APPEND wa_fieldcat TO gt_fieldcat.
    wa_fieldcat-fieldname  = 'NETPR2'.
      wa_fieldcat-fieldname  = 'NETPR'.
      wa_fieldcat-seltext_l  = 'Basic Rate'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 6.
      wa_fieldcat-do_sum     = ' '.
      APPEND wa_fieldcat TO gt_fieldcat.
    wa_fieldcat-fieldname  = 'EXBED'.
    wa_fieldcat-seltext_l  = 'Excise'.
    wa_fieldcat-tabname    = 'ITAB'.
    wa_fieldcat-row_pos    = 1.
    wa_fieldcat-col_pos    = 7.
    APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'STAX'.
      wa_fieldcat-seltext_l  = 'Sale Tax'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 7.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'DCOST'.
      wa_fieldcat-seltext_l  = 'Delivery Cost'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 8.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'NETWR'.
      wa_fieldcat-seltext_l  = 'Landed Value'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 9.
      wa_fieldcat-do_sum     = 'X'.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'LRATE'.
      wa_fieldcat-seltext_l  = 'Landed Rate'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 10.
      wa_fieldcat-do_sum     = ' '.
      APPEND wa_fieldcat TO gt_fieldcat.
    wa_fieldcat-fieldname  = 'NOMVL'.
    wa_fieldcat-seltext_l  = 'NOM Value'.
    wa_fieldcat-tabname    = 'ITAB'.
    wa_fieldcat-row_pos    = 1.
    wa_fieldcat-col_pos    = 12.
    wa_fieldcat-do_sum     = 'X'.
    APPEND wa_fieldcat TO gt_fieldcat.
    wa_fieldcat-fieldname  = 'NOMRT'.
    wa_fieldcat-seltext_l  = 'NOM Rate'.
    wa_fieldcat-tabname    = 'ITAB'.
    wa_fieldcat-row_pos    = 1.
    wa_fieldcat-col_pos    = 13.
    wa_fieldcat-do_sum     = ' '.
    APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'BGVAL'.
      wa_fieldcat-seltext_l  = 'Budget Value'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 11.
      wa_fieldcat-do_sum     = 'X'.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'ZPLP1'.
      wa_fieldcat-seltext_l  = 'Budget Rate'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 12.
      wa_fieldcat-do_sum     = ' '.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_fieldcat-fieldname  = 'VARNC'.
      wa_fieldcat-seltext_l  = 'Variance'.
      wa_fieldcat-tabname    = 'ITAB'.
      wa_fieldcat-row_pos    = 1.
      wa_fieldcat-col_pos    = 13.
      wa_fieldcat-do_sum     = 'X'.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_layout-colwidth_optimize = 'X'.
      wa_layout-zebra = ' '.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events[].
      READ TABLE gt_events WITH KEY name =  slis_ev_end_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE 'END_OF_PAGE' TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
      READ TABLE gt_events WITH KEY name =  slis_ev_end_of_list
                             INTO ls_event.
      IF sy-subrc = 0.
        MOVE 'END_OF_LIST' TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
      gd_prntparams-reserve_lines = '7'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
                i_callback_program        = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
           i_callback_top_of_page            = 'TOP-OF-PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      i_callback_html_end_of_list           = 'END_OF_LIST_HTML'
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
                is_layout                 = wa_layout
                it_fieldcat               = gt_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
             i_default                    = 'X'
             i_save                       = 'X'
      IS_VARIANT                        =
       it_events                         = gt_events
      IT_EVENT_EXIT                     =
      is_print                          = gd_prntparams
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = itab
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    FORM top-of-page .
    ALV Header Declarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header  TYPE slis_listheader,
           wa_header1 TYPE slis_listheader,
           wa_header2 TYPE slis_listheader,
           wa_header3 TYPE slis_listheader,
            wa_header4 TYPE slis_listheader.
    Title
      wa_header-typ = 'H'.
      wa_header-info = 'Purchase Variance Report'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    Material
    SHIFT p_matnr LEFT DELETING LEADING '0'.
    wa_header1-typ = 'S'.
    wa_header1-info = ' '.
    CONCATENATE 'Material : ' p_matnr matdes INTO wa_header1-info SEPARATED BY space.
    APPEND wa_header1 TO t_header.
    CLEAR wa_header1.
    Plant
    IF ( s_werks-low IS NOT INITIAL AND s_werks-high IS NOT INITIAL ).
       wa_header2-typ = 'S'.
       wa_header2-info = ' '.
       CONCATENATE 'Plant : ' s_werks-low 'to' s_werks-high INTO wa_header2-info SEPARATED BY space.
       APPEND wa_header2 TO t_header.
       CLEAR wa_header2.
    ELSEIF ( s_werks-low IS NOT INITIAL AND s_werks-high IS INITIAL ).
       wa_header2-typ = 'S'.
       wa_header2-info = ' '.
       CONCATENATE 'Plant : ' s_werks-low INTO wa_header2-info SEPARATED BY space.
       APPEND wa_header2 TO t_header.
       CLEAR wa_header2.
    ELSEIF ( s_werks-low IS INITIAL AND s_werks-high IS INITIAL ).
       EXIT.
    ENDIF.
    Period
      IF ( s_bedat-low IS NOT INITIAL AND s_bedat-high IS INITIAL ).
        wa_header4-typ = 'S'.
        wa_header4-info = ' '.
        CONCATENATE 'Period : '
                    s_bedat-low+6(2) '.'
                    s_bedat-low+4(2) '.'
                    s_bedat-low(4) INTO wa_header4-info SEPARATED BY space.
        APPEND wa_header4 TO t_header.
        CLEAR wa_header4.
      ELSE.
    IF ( s_bedat-low IS INITIAL AND s_bedat-high IS INITIAL ).
        wa_header4-typ = 'S'.
        wa_header4-info = ' '.
        CONCATENATE 'Period : '
                    s_bedat-low+6(2) '.'
                    s_bedat-low+4(2) '.'
                    s_bedat-low(4)
                    'to'
                    s_bedat-high+6(2) '.'
                    s_bedat-high+4(2) '.'
                    s_bedat-high(4) INTO wa_header4-info SEPARATED BY space.
        APPEND wa_header4 TO t_header.
        CLEAR wa_header4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                    " top-of-page
    *&      Form  end_of_list_html
          output at the end of the list - not in printed output       *
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
      DATA: ls_text TYPE sdydo_text_element,
            l_grid     TYPE REF TO cl_gui_alv_grid,
            f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
      DATA: qty1 TYPE sdydo_text_element.
      DATA: unt1 TYPE sdydo_text_element.
      DATA: wtd1 TYPE sdydo_text_element.
      DATA: cur1 TYPE sdydo_text_element.
      DATA: var1 TYPE sdydo_text_element.
      DATA: verp1 TYPE sdydo_text_element.
      DATA: bgv1 TYPE sdydo_text_element.
      qty1 = qty.
      unt1 = unt.
      wtd1 = wtd.
      cur1 = cur.
      var1 = var.
      verp1 = verp.
      bgv1 = bgv.
      ls_text = 'SUMMARY'.
      CALL METHOD end->add_text
        EXPORTING
          text         = ls_text
          sap_emphasis = 'strong'.
    Total Qty Bought (start new line)
      CALL METHOD end->new_line.
      CALL METHOD end->add_text
        EXPORTING
          text = 'Total Qty Bought : '.
      CALL METHOD end->add_text
        EXPORTING
          text = qty1.
      CALL METHOD end->add_text
        EXPORTING
          text = unt1.
    Wtd. Avg. Purchase Rate
      CALL METHOD end->new_line.
      CALL METHOD end->add_text
        EXPORTING
          text = 'Wtd. Avg. Purchase Rate : '.
      CALL METHOD end->add_text
        EXPORTING
          text = cur1.
      CALL METHOD end->add_text
        EXPORTING
          text = wtd1.
    Wtd. Avg. Budget Rate
      CALL METHOD end->new_line.
      CALL METHOD end->add_text
        EXPORTING
          text = 'Wtd. Avg. Budget Rate : '.
      CALL METHOD end->add_text
        EXPORTING
          text = cur1.
      CALL METHOD end->add_text
        EXPORTING
          text = bgv1.
    Gain / Loss
      CALL METHOD end->new_line.
      CALL METHOD end->add_text
        EXPORTING
          text = 'Gain / Loss : '.
      CALL METHOD end->add_text
        EXPORTING
          text = cur1.
      CALL METHOD end->add_text
        EXPORTING
          text = var1.
    MAP ( Moving Average Price )
      CALL METHOD end->new_line.
      CALL METHOD end->add_text
        EXPORTING
          text = 'Mov Avg Price : '.
      CALL METHOD end->add_text
        EXPORTING
          text = cur1.
      CALL METHOD end->add_text
        EXPORTING
          text = verp1.
    ENDFORM. "end_of_list_html.
    *&      Form  END_OF_PAGE
    FORM end_of_page.
      DATA: listwidth TYPE i,
            ld_pagepos(10) TYPE c,
            ld_page(10)    TYPE c.
      wtd2 = wtd.
      bgv2 = bgv.
      CONDENSE qty.
      CONDENSE unt.
      CONDENSE wtd2.
      CONDENSE bgv2.
      CONDENSE var.
      CONDENSE verp.
      SKIP.
      WRITE:/ 'SUMMARY:'.
    write:/ sy-uline(7).
      WRITE:/ 'Total Qty Bought        : ', qty, unt.
      WRITE:/ 'Wtd. Avg. Purchase Rate : ', wtd2, cur.
      WRITE:/ 'Wtd. Avg. Budget Rate   : ', bgv2, cur.
      WRITE:/ 'Gain / Loss             : ', var, cur.
      WRITE:/ 'Mov Avg Price           : ', verp, cur.
    ENDFORM.                    "END_OF_PAGE
    *&      Form  END_OF_LIST
    FORM end_of_list.
      DATA: listwidth TYPE i,
            ld_pagepos(10) TYPE c,
            ld_page(10)    TYPE c.
      wtd2 = wtd.
      bgv2 = bgv.
      CONDENSE qty.
      CONDENSE unt.
      CONDENSE wtd2.
      CONDENSE bgv2.
      CONDENSE var.
      CONDENSE verp.
      SKIP.
      WRITE:/ 'SUMMARY:'.
    write:/ sy-uline(7).
      WRITE:/ 'Total Qty Bought        : ', qty, unt.
      WRITE:/ 'Wtd. Avg. Purchase Rate : ', wtd2, cur.
      WRITE:/ 'Wtd. Avg. Budget Rate   : ', bgv2, cur.
      WRITE:/ 'Gain / Loss             : ', var, cur.
      WRITE:/ 'Mov Avg Price           : ', verp, cur.

  • Provide ALE and IDOC Faqs and all Transactions

    Dear Experts,
    I am new to ALE & IDOC.
    Please provide ALE & IDOCs FAQs and all Transactions?
    Thanks in advance.

    <b>FAQS</b>
    A L E
    Q: Our IDOC remains in status 51 ( not posted) while testing ALE setup by passing DEBMAS02 Idocs. The message 'Field KNA1-BRSCH is not an input field'. This is the Industry key. What are we missing?
    A: Go to IMG - menu path IMG->LogisticsGeneral-> Logistics Basic Data: Business partners->Customers-> Control->Define Account groups and field selection for customer.
    Select sold-to or ship-to. Select General Data. Select control and double click. Industry key is found here. Change the option to 'Optional Entry'.
    Check OSS 5599. You may have to update view V_T078D also.
    E D I / IDOC
    Q:1 We created an EDI Vendor and created all required output conditions. However no IDOC is generated when PO is printed. Why?
    A: Go to Header->output for the PO. The output type shall be '6'. The status shall be '1'. If the status is '0' check the timing. If the status is '2' , go to 'GOTO->Processing Log' and the explanation for non-generation of IDOC can be seen.
    Q: How can we create / upload IDOC's from legacy system to SAP?
    A: Third party tool Mercator may be used to convert Legacy files to Idoc format. Mercator provides an IDOC tree import facility, SAP provides the export facility. You can transfer the Idoc layouts from SAP to Mercator automatically and then map.
    Q: We want to receive an outbound EDI 855 IDOC only if E2EDP20 -scheduling confirmation segment is present. Else get an "error" status preventing triggering the EDI subsystem.
    A: User exit logic has to be added in function IDOC_INPUT_ORDRSP.
    Set up a test flag and set it off when the IDOC header is read.
    Turn the flag ON when the EDP20 segment is read.
    Interrogate this flag when the next segment after EDP20 in the same IDOC comes in. If it is on ,you have an EDP20 coming in.
    Issue an error status 51 with suitable message for whichever condition you don't want the IDOC to be processed, This will stop the IDOC from posting.
    Q: Where ever PO is sent to the vendor via EDI, we want an acknowledgement of the PO by vendor. Which fields are updated and what should be my procedure?
    A: Execute Program: IDOC_INPUT_ORDRSP
    Process code: ORDR
    Message type: ORDRSP
    IDOC: ORDERS01
    The confirmation process allows the supplier to return an acknowledgment. Only Dates and quantities can be changed The information is stored in the PO and can be viewed via Item->Confirmation->Overview. The PO can be flagged as 'confirmation required' so that Pos without acknowledgement receipt can be monitored. Control keys and tolerances (days and quantities) have to be customized.
    Outbound:
    Step 1. Application document is created when transaction is saved.
    2. Message control is invoked.
    3. Messages are processed by system.
    4. Messages are Edited (if desired).
    5. Output (ALE / EDI) is checked
    6. Validate against Message control record from Partner Profile
    7. Application Document is saved.
    8. Entry NAST table is created for every selected output program
    along with Medium & Timing.
    9. Check for Process Immediately .
    If (yes)
    Determine Processing Program from TNAPR Table.
    ELSE
    Execute RSNASTED Program.
    10. Read Partner Profile to determine Process Code.
    11. Process Code points to the Function Module & Invoked.
    12. IDoc is generated.
    13. Check for ALE Request.
    if (Yes)
    Perform Filters, Conversions, Version Changes etc.
    Else.
    IDoc is stored in DATABASE.
    INBOUND:
    Step 1. EDI Subsystem creates an IDoc file from EDI Messages
    2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.
    3. Data in Control Record is validate against the Partner Profile.
    4. IDoc is generated in Database and syntax check is carried out.
    5. IDoc file is deleted once file read.
    6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
    7. Check for Process Immediately.
    If NO
    Execute RBDAPP01 Program
    Else
    Read Process Code from Partner Profile
    Process Code Points to Function Module
    Application Document Posted.
    further help:
    check url
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/ale/configuration.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapdevelopment.co.uk/training
    And also u can get lots of inof from the below link.
    http://www.sapgenie.com/ale/why_ale.htm
    Just follow the procedure
    Sending System(Outbound ALE Process)
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Create Model View
    Tcode BD82 ? Generate partner Profiles & Create Ports
    Tcode BD64 ? Distribute the Model view
    Message Type MATMAS
    Tcode BD10 ? Send Material Data
    Tcode WE05 ? Idoc List for watching any Errors
    Receiving System(Inbound ALE )
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 ? Idoc List for inbound status codes
    ALE IDOC Steps
    Sending System(Outbound ALE Process)
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Create Model View
    Tcode BD82 !V Generate partner Profiles & Create Ports
    Tcode BD64 !V Distribute the Model view
    This is Receiving system Settings
    Receiving System(Inbound ALE )
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 !V Idoc List for inbound status codes
    Message Type MATMAS
    Tcode BD10 !V Send Material Data
    Tcode WE05 !V Idoc List for watching any Errors
    STEP 1)a Goto Tcode SALE
    Click on Sending & Receiving Systems-->Select Logical Systems
    Here Define Logical Systems---> Click on Execute Button
    go for new entries
    -System Name : ERP000
    -Description : Sending System
    -System Name : ERP800
    -Description : Receiving System
    press Enter & Save
    it will ask Request
    if you want new request create new Request orpress continue for transfering the objects
    B) goto Tcode SALE
    Select Assign Client to Logical Systems-->Execute
    000--> Double click on this
    Give the following Information
    -Client : ERP 000
    -City :
    -Logical System
    -Currency
    -Client role
    Save this Data
    Step 2) For RFC Creation
    Goto Tcode SM59-->Select R/3 Connects
    Click on Create Button
    RFC Destination Name should be same as partner's logical system name and case sensitive
    to create the ports automatically while generating the partner profiles
    give the information for required fields
    RFC Destination : ERP800
    Connection type: 3
    Description
    Target Host : ERP000
    System No:000
    lan : EN
    Client : 800
    User : Login User Name
    Password:
    save this & Test it & RemortLogin
    STEP 3) Goto Tcode BD64 -- click on Change mode button
    click on create moduleview
    short text : xxxxxxxxxxxxxx
    Technical Neme : MODEL_ALV
    save this & Press ok
    select your just created modelview Name :'MODEL_ALV'.
    goto add message type
    Model Name : MODEL_ALV
    sender : ERP000
    Receiver : ERP800
    Message type :MATMAS
    save & Press Enter
    STEP 4) Goto Tcode BD82
    Give Model View : MODEL_ALV
    Partner system : ERP800
    execute this by press F8 Button
    it will gives you sending system port No :A000000015(Like)
    STEP 5) Goto Tcode BD64
    select the modelview
    goto >edit>modelview-->distribute
    press ok & Press enter
    STEP 6) goto Tcode : BD10 for Material sending
    Material : mat_001
    Message Type : MATMAS
    Logical System : ERP800
    and Execute
    STEP 7)goto Tcode : BD11 for Material Receiving
    Material : 100-300
    Message Type : MATMAS
    and Execute --> 1 request idoc created for message type Matmas
    press enter
    Here Master Idoc set for Messge type MATMAS-->press Enter
    1 Communication Idoc generated for Message Type
    this is your IDOC
    Change Pointers
    how to change the description of a material using ALE Change Pointers.
    I will give the following few steps
    1) Tcode BD61---> check the change pointers activated check box
    save and goback.
    2) Tcode BD50---> check the MATMAS check box save and comeback.
    3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
    4) Tcode BD52---> give message type : matmas press ok button.
    select all what ever you want and delete remaining fields.
    save & come back.
    5) 5) go to Tcode MM02 select one material and try to change the description and save it
    it will effects the target systems material desciption will also changes
    6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
    give Message type : MATMAS and Executte
    ALE/IDOC Status Codes/Messages
    01 Error --> Idoc Added
    30 Error --> Idoc ready for dispatch(ALE Service)
    then goto SE38 --> Execute the Program RBDMIDOC
    29 Error --> ALE Service Layer
    then goto SE38 --> Execute the Program RSEOUT00
    03 Error --> Data Passed to Port ok
    then goto SE38 --> Execute the Program RBDMOIND
    12 Error --> Dispatch ok
    Inbound Status Codes
    50 Error --> It will go for ALE Service Layer
    56 Error --> Idoc with Errors added
    51 Error --> Application Document not posted
    65 Error --> Error in ALE Service Layer
    for 51 or 56 Errors do the following steps
    goto WE19 > give the IDOC Number and Execute>
    Press on Inbound function Module
    for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    <b>Reward Points if it helps,</b>
    Satish

  • How to get text written in txn FBL5N?

    Hi Experts
    I am doing billing where i am following the process :-Creating Sales order>Billing Requisition>Billing(VF01). Now,after doing billing i am able to see the billed amount in customer ledger(FBL5N) but the text column is blank. So, to get some text written against billed amount what should i do ? where should i mention the text in billing process so that it get appeared under text column in txn FBL5N.
    waiting for ur replies...
    thanks

    Hi,
    The text that appears here is coming because of manual creation just for our reference.It didn't come from billing document.
    We can maintain text at the FBL5n T.Code.
    Way to maintaining:Double click on the order or on that line in which the order presents,Click on edit option.There is a field called text.enter your reminder text there.
    Save.
    Come out to initial screen.
    Again execute.You will find the text there for your order.
    For your second question:By selecting the line where you want to find the industry,Select the masterdata icon or press "CTRL+F10" to go to the customer master data directly.Here you can find the industry key.
    Regards,
    Mohan.

Maybe you are looking for