How to get Characteristic Values assigned to the line item of Sales Order?

Hi,
I want to get the Characteristic Values( Variant Configuration )assigned to First Line Item of Sales Order.
I was using the Fn. Mod.: VC_I_GET_CONFIGURATION_IBASE,
this fn. mod. giving all the Characters but not the assigned characteristic values.
Is there any other way to find characteristic values of sales order.
Thanks,
vinayak.
Message was edited by: vinayaga sundaram

For example, please see this example program.
It lists the characteristic names, the values, and the description of the values which are tied to a sales document.
report zrich_0001.
* Internal Table for Characteristic Data
data: begin of i_char occurs 0.
        include structure comw.
data: end of i_char.
data: xcabn type cabn.
data: begin of xcawn,
      atwtb type cawnt-atwtb,
      end of xcawn.
data: xvbap type vbap.
parameters: p_vbeln type vbap-vbeln,
            p_posnr type vbap-posnr.
start-of-selection.
  select single * from vbap into xvbap
             where vbeln = p_vbeln
               and posnr = p_posnr.
  clear i_char.  refresh i_char.
* Retrieve Characteristics.
  call function 'CUD0_GET_VAL_FROM_INSTANCE'
       exporting
            instance           = xvbap-cuobj
       tables
            attributes         = i_char
       exceptions
            instance_not_found = 1.
  loop at i_char.
    clear xcabn.
    select single * from cabn into xcabn
             where atinn = i_char-atinn.
    clear xcawn.
    select single cawnt~atwtb into xcawn
               from cawn
                 inner join cawnt
                   on cawn~atinn = cawnt~atinn
                  and cawn~atzhl = cawnt~atzhl
                      where cawn~atinn = i_char-atinn
                        and cawn~atwrt = i_char-atwrt.
    write:/ xcabn-atnam, i_char-atwrt, xcawn-atwtb.
  endloop.
Regards,
RIch Heilman

Similar Messages

  • How to make the line items of sales order cannot be deleted.

    Hi All,
    Is there any Enhancement spots or user-exits which make the line items of sales order cannot be deleted if item category is 'TAN'.
    Thanks in Advance,
    Sudhakar Reddy .A

    Hi All,
    If you doesn't want to delete sales order line items then we have write in the Include Program which has mentioned below and in the form .....endform.
    Program Name :  Include MV45AFZB
    _Example:_
    form userexit_check_xvbap_for_delet using us_error
                                              us_exit.
    IF .......
      US_EXIT = CHARX.
    ENDIF.
    endform.

  • To add the line item in Sales Order

    Hi Experts,
    I have to insert  the line item between two line item in sales order dynamically.
    How should i do this.
    any idea??
    Thanks in Advance.

    Hi,
    I guess you are talking about BOM, sub-items or free goods, wherein after you put in one item the other material defined gets added automatically in the sales order.
    That is done with the help of Item Category config by functional person.
    Check here for more info
    [Item Category|Re: Item Category;
    You can also use user exit MV45AFZZ form user_exit_move_to_vbap for a specific logic defined at runtime.
    Regards,
    Amit
    Edited by: Amit Iyer on Aug 26, 2009 10:21 PM

  • Delete the line item in sales order in VA01/VA02 when the quantity is modif

    Hi SAP,
       I have requirement to delete a line item in sales order.Please suggest me to do the same.
      THe scenarios is , we are inserting a free good line item based on some condition and quantity, If the quantity is modified  the free good line item inserted needs to be deleted.
    Waiting for your responce
    Thanks,
        Billa
    Moderator message : Spec dumping is not allowed,search for available information. Thread locked.
    Edited by: Vinod Kumar on Nov 14, 2011 1:54 PM

    Hi,
    Can you also check the SALES LINE.
    Sales line is the combination of SALES ORGANISATION + DISTRIBTION CHANNEL +PLANT.
    Hope it was not maintained.
    Transaction code : OVX6
    PATH:  IMG->ENTERPRISE STRCTRE->ASSIGNMENT>SALES AND DISTRIBTION->ASSIGN SALES ORG- DISTRIBTION-PLANT.
    please revert if the error still exists.
    santosh

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • To split the payment document value as per the line items of the P O

    To split the payment document value as per the line items of the purchase order in the period of payment, so that the payment  amounts are measured against the Capex order assigned as account assignment in the purchase order.(Account assignment tab for the individual line item in the PO.
    Example:
    Inputs:
    Purchase Order 3100012345, line item 10 value 6000 line item 20 value 4000
    VAT @10% , account assignment for PO line item 10(Internal Order no 10001) & line item 20  Internal  Order 10002) G/ R no 5105105101 for Rs10,000.
    The I/R doc 501501501 appears as follows: (MIRO)
    Line 10: Value       Rs   6,000
            20: Value      Rs   4,000
    VAT                         Rs      600
                           Rs      400
    Total                       Rs11, 000
    Withholding Tax Rs 1,100
    The accounting entry for MIRO happens as follows: doc 2102102101
    GR/IR Dr      Rs 10,000
    VAT      Dr     Rs   1.000
    Vendor    Cr           Rs9, 900
    TDS due   Cr          Rs1, 100
    The business expects the payment report as follows:payment  doc 2001200101
    PO     Line item       Internal Order MIRO         Invoice                       Payment       Payment period  Amount
                                                                                    A/c doc number        doc number          
    3400012345     10     10001           5605605601  2102102101           2001200101       001/2009           5940
    3400012345     20     10002     5605605601     2102102101           2001200101        001/2009          3960
    Currently we are able to show the amounts as Rs 6000 for line item 10 & Rs 4000 for line item 20.
    The problems faced.
    1.     The VAT line items are auto created, hence the reference of purchase order number and line item are not available. So the VAT portion which is part of payment liability does not get reflected against the PO.(not able to show the VAT portion , when we try to show the payment amount per PO line item.)
    2.     The withholding tax is also a problem; WHT is not calculated and assigned per line item. It is calculated on the total amount of basic and VAT. Because of these reasons, the payment could not be shown properly according to the line item of the purchase order.
    3.     When part payment is made, against invoices, there is no provision to assign a payment amount against a particular line item. Further, when final payment is made in different period, the clearing document will get generated. That adds to the complexity of differentiating full payments and part payments final clearing.
    4.     When residual payment is made, a new line item is created. Here assignment of Purchase order line item against payment for residual items become a problem.
    5.     Many a times advance payments are made. Later the invoice is created and balance payment is made. In those situations, the clearing document creates one more line item and makes payment for the balance item. This adds complexity in bringing balance payment alone and to split as per the purchase order line item. The clearing document number system is multi dimensional. It creates two line items for the same item (one at the time of advance and another the time of clearing.)
    6.     When full payment is made, the payment document number and clearing document numbers are same. In cases of subsequent or partial or residual payment, the document numbers are different. Because of this, the part payment amounts are shown in the period, where the final payment and clearing are made.
    Please suggest a way to split the payment amount in the exact posting period with all the considerations given above.
    Regards
    Sundararajan
    Edited by: Sundarajan Venkatachari on Sep 30, 2009 11:04 AM

    Hi,
    See Note 301077 - User exits for the interface to accounting, although I think that there isn't this kind of option. Note 429117 - Collective note advice note SD-FI interface will be useful too.
    I think that SAP Note 1085921 - Document split perhaps will help you
    Regards
    Eduardo

  • Change the status profile assigned to the line item from PROFA TO PROFB

    Hi Experts,
    The issue we are having relates more to the fact that the code we have written is changing the item category, however the status profile has already been retrieved from configuration based on the original item category and therefore the status selection that we are getting is incorrect.
    Item Category A -> Status Profile PROFA
    Item Category B -> Status Profile PROFB
    For example we have a line item and item category A is determined through config, this then retrieves its associated status profile PROFA. However we have then coded the system to change item category A to item category B.  However the status profile still remains PROFA.
    We need to find a way to change the status profile assigned to the line item from PROFA to PROFB.
    any quick inputs from any one please......
    Thanks in advance
    hemanth

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • Substitution and activated the same at the line item level in order to subs

    I have created a substitution and activated the same at the line item level in order to substitute the ZRSPL (Payment Block) field by a constant value and a vendor invoice is posted using Transaction FB60. But the same is not working. When I post a vendor invoice using FB60, Payment Block field is being shown as blank instead of the constant value which I want to substitute.
    >
    > My prerequsite is mentioned below :
    > BKPF-TCODE = &#39;FB60&#39; AND BKPF-BUKRS = &#39;ABC&#39; AND ( BKPF-BLART = &#39;KR&#39; OR
    > BKPF-BLART = &#39;KY&#39; ) AND BSEG-DMBTR &gt; &#39;10000&#39;

    Hi,
    I am not understanding the logic behind the prerequisites mentioned in your query.
    Payment block field exists only for vendor related line item.  However, you have not mentioned vendor reconciliation account in the prerequisites.  It means, this substitution will trigger for all the line items which is wrong.
    Or try following  options.....
    1) Substitution->Simulation
    2) Extras->Expert Trace
    Best Regards,
    Madhu

  • How to add line item to sales order item table?

    Kindly help me the with the below requirement .
    Add line item to sales order(va01) dynamically on click of button. The button is also custom created push button.
    In the above requirement I have added the pushbutton to va01 tcode. But when I click on that button I need to add line item to sales order item table.
    I tried a lot but I am not successful. If possible can u please help on this.
    Regards,
    Rachel

    Hi!
    It's quite easy even in the standard SAP to add a line item for a customer order, I don't think it worth to develop a new button for this.
    However if you wanted to add a line automatically, the you can do the following in the program MV45AFZZ, FORM USEREXIT_SAVE_DOCUMENT.
    You can use similar code, but with some modifications.
    DATA: lv_posnr.
    LOOP AT xvbap.
    MOVE xvbap-posnr TO lv_posnr.   "get the last posnr
    ENDLOOP.
    ADD 10 TO lv_posnr.
    MOVE 'XYZ' TO xvbap-matnr.   "enter your material number here
    MOVE lv_posnr TO xvbap-posnr.
    * fill additinal field data in XVBAP if necessary
    MOVE 'I' TO xvbap-updkz.                  "Insert line
    APPEND xvbap.
    Regards
    Tamá

  • MRP RUN for the more than one line item in sales order.

    Hi ,
    In the sales order nuber of line item are , i will have to take MRP RUN for selected line item .
    So plz suggest what development will require?
    Abhay
    Edited by: abhay patil on May 30, 2008 8:52 AM

    HI,
    U can write separate prog. Which will ask sales order no. and from to line item or multiple line item of sale order. Then in loop internally pass the each line item no to MD50 prog. Which will run in background.
    I will give u sample prog. Which I had created for running MRP for all the lines items of given sales order in one go.
    *& Report  ZPRG_PP_001
    REPORT  ZPRG_PP_001.
    tables vbak.
    data: begin of it_vbap occurs 1,
            vbeln  type    vbap-vbeln,
            posnr  type    vbap-posnr,
          end   of it_vbap.
    DATA: P_MODE   TYPE    C.
          Batchinputdata of single transaction
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    selection-screen begin of block b1 with frame title text-001.
      parameters :   p_vbeln  like  vbak-vbeln obligatory.
      selection-screen skip.
      parameters :   p_fore   radiobutton group mode,
                     p_back   radiobutton group mode default 'X'.
    selection-screen end   of block b1.
    at selection-screen.
    Check Sales Order
      if not p_vbeln is initial.
        select single * from vbak
          where vbeln eq p_vbeln.
        if sy-subrc <> 0.
          message e499(sy) with 'Invalid Sales Order no.' p_vbeln.
        endif.
      endif.
    start-of-selecTION.
    Get Sales order items
      select vbeln posnr from vbap
        into table it_vbap
        where vbeln eq p_vbeln.
    Set BDC mode
      if p_back eq 'X'.
        p_mode = 'E'.
      else.
        p_mode = 'A'.
      endif.
    Process MD50 BDC
      LOOP AT IT_VBAP.
        perform bdc_dynpro      using 'SAPMM61X' '0160'.
        perform bdc_field       using 'BDC_CURSOR'  'RM61X-TRMPL'.
        perform bdc_field       using 'BDC_OKCODE'  '/00'.
        perform bdc_field       using 'RM61X-KDAUF'  IT_VBAP-VBELN.
        perform bdc_field       using 'RM61X-KDPOS'  IT_VBAP-POSNR.
        perform bdc_field       using 'RM61X-BANER'  '1'.
        perform bdc_field       using 'RM61X-LIFKZ'  '3'.
        perform bdc_field       using 'RM61X-PLMOD'  '3'.
        perform bdc_field       using 'RM61X-TRMPL'  '1'.
        perform bdc_dynpro      using 'SAPMSSY0' '0120'.
        perform bdc_field       using 'BDC_OKCODE'   '=XBAC'.
        CALL TRANSACTION 'MD50' USING BDCDATA MODE P_MODE.
        CLEAR BDCDATA.
        REFRESH BDCDATA.
      ENDLOOP.
    end-of-selection.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.
    Ajay P. Nikte

  • How To get Characteristic values for an Equipment in a particular Class ?

    Hi All,
    How i will get  Characteristic values for an Equipment in a particular Class ?
    Any table or FM ?
    Thanks in advance
    Srikanta Gope

    Hi,
    You can use the FM BAPI_OBJCL_GETDETAIL to fetch the characteristic values for an equipment from the table parameters ALLOCVALUESNUM; ALLOCVALUESCHAR; ALLOCVALUESCURR.
    Or u can use the tables EQUI, KLAH, KSSK, AUSP, CABN
    Regards,
    Aditya

  • How to select Vendor information as per the line item of the shopping cart

    SRM ABAPers,
    I want to create a custom report and needs to produce SC's item details with vendor's information.
    So I want to select the vendor information(including the partner function- 00000019 or 00000039) as per the line item of the shopping cart, which SRM table can give me this information?
    Thank you!
    MP

    Hi,
    To get the SC item details,you an use the FM 'BBP_PD_SC_GETDETAIL".
    Also to get the vendor details,you can use the FM "BBP_PARTNER_GET_PURCH_DATA_NEW".
    BR,
    Disha.
    Pls reward points for useful answers.

  • How 2 read all the line of a sales order text ID plz

    Dear all
    I have the following to read sales order text of single line of limited char(40)
      TIDNO = '0003'.
        CONCATENATE SSORD
                    LIPS-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-PACKTYP = mslines-tdline(40).
          EXIT.
        ENDLOOP.
      How do i read mutiple lines plz tell me ?
    Thnx
    Moni
    Message was edited by: md monirujjaman

    Hi Md,
    sorry I don't understand your question, can you explain more ?
    Regards
    Frédéric

  • How to get report for deleted line items from sales orders

    Dear FRIENDS,
    please infirm the t.code or report for viewing the deleted line items from sales ordrers.
    Kindly do the neeedful.
    regards,
    N.M.PAWAR

    Hi,
    With transaction SE16 you can view table CDHDR for header changes and
    CDPOS for item changes. This includes deletion.
    OR
    GO to VA03 - Display Sales order -> Put order no : don't press enterbutton. -> Go to Enviornment -> changes -> You will get details
    Date ItmNo. SLNo Action
    Hope this help please close the thread if answers

  • How to include Business Place field in the line item for argentinian comp?

    Dear,
    We've just implemented a company code from Argentina, but when we try to post a document, the system doesn't show the field Business place in the line item, so we can't fill this field. This problem is causing some posting errors for us. Is the any way to set this field in the transaction FB01?
    We have already checked the field status for account and posting key. The field is not available is this functions.
    Thanks in advance,
    Leandro Albertini

    Hi Albertini,
    Follow the path as follows and configure the business place for your plant and company code:
    SPRO, Financial Accounting, Financial Accounting Global Settings, Tax on Sales/Purchases, Basic Settings, Settings for Tax on Sales/Purchases in South Korea, Assign Business Place.
    In this activity, you can assign a business place to a plant. The business place is recorded for each posting.
    Please reward points if helpful.
    Regards,
    Sreekanth....

Maybe you are looking for

  • Sluggish Reboot after 10.6.8 Update

    Since updating my computer brings up a blue screen for 5 minutes or so then goes to the login screen where I have to wait several minutes before I login.  Also, my internet appears sluggish.  Any Suggestions? Autumn

  • Error while calling "sql Type" in forms

    Hi all, I have created a SQL TYPE in user schema and call it through form.While compiling form following error message arise: Implementation restriction [may be temporary] ADT or schema level collection not supported at client side with non-OCI mode.

  • HT204150 My contacts are all gone, how do I get them back?

    Somehow all my contacts are totally gone! Am I able to get them back?

  • Performance Of Flex Application?

    Hello all     Recently I went through video tutorials of flex and found it to be great.But I have one question regarding performance. If I am not wrong then Flex application works like this, Entire application is converted into swf file and for navig

  • Cant see the page links text in my main & side navigation bars

    Hi I published my site to Mme yesterday and I have noticed a few problems have come up. The main problem is my main and side navigation bars. In the top nav bar you cant see all the page links text, they should show up in white. I can only see them w