Regd: Sale Order U.O.M

Hi All,
While downloadng the data from VBAP DB Table fro a particular S.O.document the Unit of measurement correct value is not geting stored in the internal table but at the time of displaying as a report i get the correct value.
Like when i set a break point in the program at the internal table level and view the data's the field value of VBAP-VRKME or VBAP-MEINS should be "PC" but i am getting a value as "ST" but at the time of displaying in the report it is displaying as "PC" only.
Because i hav to generate a XML based on the values of the Internal Table.
Is there any possibility to eliminate this problem or any other corressponding table from which i can get the exact value.
Help and Suggestions will be much appreciated.
Thanks & Regds.
Ramesh.

Hi Tanveer Shaikh,
Here is my sample code below.
REPORT  ZSO_STATUS_XML NO STANDARD PAGE HEADING.
   TBALES DECLARATION
TABLES:  VBAK, "Sale Order Header
         VBAP, "Sale Order Item Data
         VBEP, "Schedule Line Data
         KNA1, "General Data in Customer Master
         VBRP. "Billing Document Item Data
   TYPES DECLARATION
TYPES : BEGIN OF TY_SOSTATUS,
          KUNNR    LIKE VBAK-KUNNR,  "Customer Number
          NAME1    LIKE KNA1-NAME1,  "Customer Name
          BSTNK    LIKE VBAK-BSTNK,  "Customer P.O.
          BSTDK    LIKE VBAK-BSTDK,  "Customer P.O. Date
          VBELN    LIKE VBAK-VBELN,  "Sale Order Number
          ERDAT    LIKE VBAK-ERDAT,  "Sale Order Date
          POSNR    LIKE VBAP-POSNR,  "Sale Order Line Item
          MATNR    LIKE VBAP-MATNR,  "Material Number
          ARKTX    LIKE VBAP-ARKTX,  "Material Description
          KWMENG   LIKE VBAP-KWMENG, "Sale Order Quantity
          MEINS    LIKE VBAP-MEINS,  "Unit of Measurement
          EDATU    LIKE VBEP-EDATU,  "Sale Order Schedule Date
          FKIMG    LIKE VBRP-FKIMG,  "Despatch Quantity
          GBSTA    LIKE VBUP-GBSTA,  "Overall Sale Order Status
          PNDQTY TYPE I,
END OF TY_SOSTATUS.
DATA: XML_OUT TYPE STRING.
   INTERNAL TABLE DECLARATION
DATA : IT_SOSTATUS TYPE STANDARD TABLE OF TY_SOSTATUS
            WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
DATA : BEGIN OF IT_XML_OUT  OCCURS 0,
       A(1500) TYPE C,
       END OF IT_XML_OUT.
   SELECTION SCREEN DECLARATION
SELECTION-SCREEN  BEGIN OF BLOCK SOBLOCK WITH FRAME.
SELECT-OPTIONS:   S_VBELN FOR VBAK-VBELN,
                  S_ERDAT FOR VBAK-ERDAT,
                  S_AUART  FOR VBAK-AUART,
                  S_WERKS FOR VBAP-WERKS.
SELECTION-SCREEN  END OF BLOCK SOBLOCK.
   START OF SELECTION
SELECT SVBELN SAUART SERDAT SKUNNR SBSTNK SBSTDK
               LPOSNR LMATNR LARKTX LKWMENG L~MEINS
               EEDATU FFKIMG GGBSTA NNAME1 FROM VBAK AS S INNER JOIN VBAP AS L ON SVBELN = LVBELN
                                                      INNER JOIN VBEP AS E ON SVBELN = EVBELN
                                                      INNER JOIN VBRP AS F ON SVBELN = FAUBEL
                                                      INNER JOIN VBUP AS G ON SVBELN = GVBELN
                                                      INNER JOIN KNA1 AS N ON SKUNNR = NKUNNR
                                                      INTO CORRESPONDING FIELDS OF TABLE IT_SOSTATUS
                                                      WHERE S~AUART IN S_AUART AND
                                                      S~ERDAT IN S_ERDAT AND
                                                      L~WERKS IN S_WERKS .
CALL TRANSFORMATION (`ID`) SOURCE IT_XML_OUT = IT_SOSTATUS[] RESULT XML XML_OUT.
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
  EXPORTING
    I_STRING               = XML_OUT
    I_TABLINE_LENGTH       = 1500
  TABLES
    ET_TABLE               = IT_XML_OUT
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'C:\TEST1.xml'
TABLES
data_tab = IT_XML_OUT.
submit Z_INO1_SO_STATUS_FTP USING SELECTION-SET 'Z_SO_FTP' and
return .

Similar Messages

  • Regd: Sale order Overall Status

    Hi All,
    I hav requirement that depending on the Overall staus of a Sale Order i hav to get the data's of the Invoice details.
    For this i need to capture the filed value of <b>"GBSTA_BEZ"</b> for that particular Sale Order in the T-Code Va02 or 03. but wen i chkd the screen it seems to be displaying through structure only.
    Any idea where can i get the value of this particular field in any DB table or through any other method.
    Help and Suggestions will be much apprieciated.
    Thanks & Regds.
    Ramesh.

    Hi Ravikumar Allampallam,
    Evn I chkd in the VBKD DB table also in the related tables but its not available, But its displaying through the structure <b>"VBSTT"</b>, i chkd for the field if stored in any toher table but its not.
    Do we have any other method to get that Field Value.
    Thanks & Regds.
    Ramesh.

  • Regd : Error during saving the  sales order for Variant configuration

    Hi -
    When the item( config material) is saved in the sales order , system scheduled the production order and getting an error as " Posting Rule for Assembly order for item 000010 could not be generated".
    Any solutions regarding the error.

    Hi,
    This is the process of Assembly to order with variant configuration. In material master, you can maintain gen item category 0002 (configurable material) in basic data view, sales 2 view item category grp 0002 and strategy group 82 in MRP 3 view. After creating of material master, BOM & Routing, You can create sales order in VA01 transaction.
    In this VA01, When you create sales order, system will check material availability, capacity checking and system will show variants for each items. And also when you will save the sales order, system will create production order no immdiately.
    So you can maintain the above settings compulsory.
    please let me know any clarification.
    Regards,
    Mohan

  • Regd creation of New Sales Order Type - Credit Memo Request

    Hello Gurus,
    I have created a New Sales Order Type as per the given requirements. This is a Credit Memo Request. I have done all that are needed from SD perspective.
    Can you please let me know what needs to be done from FI-CO perspective when a New Sales Order Type is created and this is a Credit Memo Request. If some one can let me know the customizations that needs to be done it will be very helpful for me.
    Thanks,
    SNK.

    Hi,
    As per my understanding, there is nothing to be required from FI-CO perspective, in case when you defined a document type in SD.
    During the sales order processing the SD-FI interface happenes for following activities
    1) Credit check (In case you use Credt management)
    2) Tax determination
    For more knowledge
    go through the link given below.
    http://www.sap-img.com/sap-sd/link-between-sap-sd-mm-and-fi.htm
    Hope it helps,
    Regards,
    MT

  • Partial allocation against sale order during allocation run

    Hi Experts..
    How to do allocation run for partial quantity against to the particular AFS sale order while doing allocation run process in J3AT.
    Example :
    I have sale order stock 10 qty. but I want to do allocation run for 5 qty. So that I can make partial delivery for this 5 qty alone. So please suggest me how to do partial allocation run.
    Thanks in advance
    Regds
    Prabakar

    Hi,
    You can try TCode V.00
    This transaction when executed will give you the list of all the sales documents blocked for delivery per sales organization. There are various other criteria which might be useful. This transaction will allow you to edit each sales document.
    If this is not the one that you want, then perhaps you might have to develop one.
    Thanks
    Mukund S

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI

    I am having a problem when creating a sale order using BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    Problem is that sale order item quantity field is not populating
    code is as follows
    ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
    ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
    ORDER_ITEMS_IN-TARGET_QU = 'LB'.
    ORDER_ITEMS_IN-TARGET_QTY = 1.

    Hi,
    Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
    Regds,
    Rudra

  • EK01 and EK02 not copied to sales order item

    Dear colleagues,
    Is it possible to have EK01/EK02 transferred to the sales order item for assembly type = "0 no assembly order processing"
    (specified in requirement class definition)? I would like to have planned production costs in EK02/EK01.
    I don't specify costing method, variant and sheet in requirement class definition (transaction ovzg)
    The steps are following:
    1. create sales order
    2. set manually proper item category (which refers to assembly type = "0 no assembly order processing")
    3. MD04 - convert generated planned order (lower-level for HALB) into production order
    4. MD04 - release HALB production order
    5. MD04 - convert generated planned order (higher-level for FERT) into production order
    6. MD04 - release FERT production order
    7. ????? we could expect EK02/EK01 in sales order item coming from production orders ?????
    I have found SAP note 857299 nevertheless it is not stated precisely there.
    Please let me know your observations in this area.
    Regards,
    Wojtek

    Hi..
    Hi
    Small change in the program will copy the PO number from Contract to sales order.In case need take help of ABAPer
    Data which is not copied
    LOCAL: VBKD-FKDAT.
    LOCAL: VBKD-FPLNR.
    LOCAL: VBKD-WKWAE.
    LOCAL: VBKD-WKKUR.
    LOCAL: VBKD-DELCO.
    LOCAL: VBKD-BSTKD.
    LOCAL: VBKD-ABSSC.
    LOCAL: VBKD-BSTDK.
    In your data declaration, you have
    LOCAL: VBKD-BSTDK
    Regds
    MM

  • Error while transferring SALES ORDER from ECC to SCM

    Hi Experts,
          I am working with SCM4.0 and ECC 5, while i transferring the sales order from ECC5 to SCM ,it encounters with the following errore message.
    <b>Sales order M-10 1000: Integration model does not contain material master
    Message no. XC100
    Diagnosis
    To ensure a consistent dataset in SAP APO, the material master data for filter object Sales order M-10 1000 also has to be known in SAP APO. In the current case no entry was found for the combination   in the models that were checked.
    System response
    Object Sales order M-10 1000 cannot be transferred correctly.</b>
    Any kind of suggestions would be appreciated well.
    Thanks in advance..
    Regards,
    A.Fahrudeen

    Hi Fahrudeen ,
    I hope the master Data like Material and Location and Customer are not CIFed to APO prior to Sales order or else while ciffing the sales order you have not selected the sales order radio button and same time only enter the Material ,location and customer wothout the tick on filter objects for Mat/Loc and Cust.
    Hope this helps..
    Regds// Digs...

  • How to find out if the stock is available for the sales orders

    hello gurus
    We have 25 sales orders.. for which we did not have any stock.. so we produced internally and now the stock is available physically and stock is updated in SAP as well.
    How can i know that for all the 25 orders ..if the stock is now available for all the orders.. we have a requirement that unless we have a stock available for each order we cant create deliveries.. againts the sales order.
    I would like to know what is the best possible way to check the stock availability for all the 25 orders at one time.
    Note : All 25 orders have different materials.. in them
    regards
    mohammed

    Hi,
    To check the stock availability tcode is MMBE, enter the material no, plant and storage location and then click the  EXECUTE button ,u will see the stock.
    For different materials , u ve to repeat the above steps.
    Reward points if it helps.
    Regds,
    Pallavi

  • Payer is different in sales order than in customer master

    Hi Sap Gurus,
    While I am creating a B1(Rebate credit memo requst) the payer is different from customer master.
    e.g Suppose the payer in customer master is 100000 & sold to party is 100085 but in sales order the payer is getting changed to 100085.
    But when I create a normal CR(credit memo request) in sales order it is showing the same payer as in customer master.
    I have checked in VBO2 the rebate receipient, it is 100085.However when I changed the rebate receipient to 100000 all the partner funtions are getting changed to 100000 in sales order.
    I also tried creating a B1 document with a customer other than 100085, in sales order the payer is same as in customer master.
    I am facing problem when I try to raise B1 documnt type for this particular customer i.e 100085.
    Need your help badly.
    Regds....
    Sumit

    In case, for your sold to party 100085, if you have assigned  payer as 100000,  in sales order the payer should be 100000.
    If not check your settings as to why you are getting payer as 100085

  • Billing Plan from Quotation to Sales Order

    Hello Friends,
    When Iam creating a Sales Order with reference to a Quotation, I want to copy the Billing Plan automatically from Quotation to Sales Order.
    How can I achieve this??
    Thx,
    Smitha.

    Hi Smitha,
    During sales order processing, the system determines from the item category whether a
    billing plan is required and, if so, which type of plan
    The type of billing plan that is determined at this point is set up in Customizing and
    cannot be changed in the sales document
    REWARD IF U FINDS THIS AS USEFUL...
    Regds
    MM

  • Two config material in sales order?

    Hi All
    In variant Configuration , in sales order i created two line items with the same material , but the character values are diff.
    When i run the md04 it working fine with the item 10 , but for the item 20 no value related material has not been  picked from the bom.
    Is it okay to enter the variant materials (configuration material ) more than one times in sales order.
    Please let me know where do i have the conf settings.
    Advance thanks
    Regds
    Praveen

    hello, friend.
    in our projects, we have successful entered 2 or more configurable materials.  we are not aware of any settings to allow more than 1 configurable material, but the other consultants may have other opinions.
    however, please check your document type, and look at the item number increments.  maybe this could be affecting the system reaction.
    also, look at the item category and the entry for "HLIt" for your line item 20.
    hope to hear your feedback.
    regards.

  • Subcontracting PO against Sales Order

    Hi MM Guru
    I have a subrontracting PO against a sales order(Procurement Type E) with account assigment Categories "E"
    I wish to issue the material to vendor from special stock
    how do i do that??
    Thanks & Regds:
    N. N. Tiwari
    nntiwari2004 at g m a i l
    Edited by: Narendra Nath Tiwari on Jul 26, 2008 8:40 AM

    hi
    you can use the trnadx MB1B move type 541
    do gr 101 and cons 543
    But if you want to mantain that while issuing you should link it with sales order stock with stk type E
    Then use 311 E ie storage location transfer create an vendor storage location for the same also.
    In tax on goods mov-> India.->basic settings->buss trax->sub contracting->mantain move ment type grps->there for 0001 set 311 e and 312 e for 0002 issue and receipt grps. Rest remains the same as for normal process.
    Also ste the account determination for the same with FICO cons.
    So you can issue wrt to sales order and can do GR with movement type 101 for FG and 543 for cons of cons.
    Hope this helps
    Regards
    Sujoy

  • Changing Availability Checking Group in Sales Order.

    Hello Gurus:
    We changed the checking group in the material master.  The existing sales orders still shows the earlier checking group.  So how to change the checking group in existing sales order also (after it is changed in material master).  Also, once the checking group in sales order is changed, how to de-commit and re-commit material as per the new checking group.  Thanks.
    - Chetan

    Chetan,
    As you have changed Checking Group in MMR later on all ur availability check etc will be calculated as per previous MMR settings..
    Still go to OVZ9...See if your sales order has correct Check rule/Group..
    Then Go to sales order Carry out availability check again...See if Avalability Overview has changes as per your new Check Rule..
    Also Do Some R & D...
    Like test with change in quantity of line items...save and carry out avalability check gain..See if schedule line dates in Sales order Is there any change?
    See if any change is there...
    If not better create new  sales order...it will minimise your efforts and will be quicker way..
    REWARD IF U FINDS THIS AS USEFUL...
    Regds
    MM

  • How to trigger workflow from changes in Sales Order in CRM?

    Hi Experts,
    I want to trigger event at the time of saving the changes in sales order (TCODE- CRMD_ORDER).
    I have found one BO - BUS2000115 but it is getting triggered only after new creation of sales order.And there is no BO available when we change the sales order.For this reason I have created one customize event in BO(BUS2000115).
    Now my question is How should I link this customize event so that it will trigger after saving the changes ?
    I have seen SWEC transaction but was not able to find anything to link this customize event.
    Please help ....!!!
    Good response will be rewarded.
    Thanks
    Snehasish Das
    Edited by: Snehasish Das on Feb 14, 2008 2:31 PM

    In SWEC, actually you link the change document object to a Business object and its corresponding event , to which workflow should react to.
    If yo udo not find the entry then, yo unedd to create one with finding out the respective chage documnet object.
    Hope that helps.
    Regds,
    Akshay

Maybe you are looking for