Line item PO should disply in the report

Hi,
As per the business requriement i need to display the line item PO discritpion into the  report.
Currently we have one existing Z report and we are developing new Z reprot by copying that exisitng report by adding the line field.
The PO number field is same for both header and line item ( the reason could be since header PO number header data which is copied to all the line items). the field name for both is VBKD-BSTKD
Sales order:
we have developed one new Z report as per the above requirement, below is the output of it. it is showing both line items are HEADER PO only. But our requriement it should display the 2nd line item as ITEM PO1 which was manually changed by the user in sales order.
So what is the field and table i should give to the ABAP er so that it would display the line item PO details of Sales order into the report.
Please let me know if you need any further details?
thanks,

Hi Lakshmipathi Sir,
Thanks for your reply. Could you please let me know how exactly i need to mention the logic to ABAPer.
I can see two fields are giving from VBKD table with line item wise it is displaying.
1. BSTKD
2. BSTKD_M
thanks,

Similar Messages

  • Each PO Line Item price should be as per the scale in contract?

    Hi
    I have a PO with 2 line items, both line items are for the same material.As I order 2 different quantities, I get 2 different prices, i.e. per line item. (As per the Scales Maintained in the contract)
    However once I save the PO, and then display the PO, the price is taken for the total quantity. Is there any way that I can have 2 different prices for both materials in the same PO?
    This behaviour has changed in the last 1 month only.
    Earlier in our SAP system each line item had different price as the scale for the ordered quantity in that line item.
    We though it could be due to Group Condition checked in the Condition Type, but that check has been in our system since long time, hence it cannot be the reason.
    Thanks in Advance!

    Yes... this is a standard behavior..
    You can do one option...
    When PO fetch the price from contract, then copy the price and enter it manually again, then PO can remember the price after save..
    Check the similar discussion PO Price update issue

  • PO Line item attachments going along with the PO o/p to Vendor!

    Hi all,
    We are on SRM 5.0 ECS SP 13.
    I had one question regarding the attachments in the PO line items.If I attach documents at the PO Line item and sent the PO o/p to vendior through e-mail,then all the attachments at the PO line item also go along with the o/p..Is this is  a  std behaviour in SRM 5.0?
    Also if i need to avoid sending of the PO line item attachments along with the PO o/p to the vendor,then I guess the "Internal" indicator for the documents need to be set rt?Is there any way the documents at the PO line item can be set as "INTERNAL"?
    I know this is achived in SRM 6.0 and above and there is an OSS note which mentions that.
    Has anybody worked on something similar?Please share your eperiences/suggestions.
    Thanks!

    HI,Rads:
         I think you should do the inhancements in this situation. I met this question in my last case .Follow is my suggestions ,maybe helpful .
        The   BADI NAME:BBP_OUTPUT_CHANGE_SF(Document Output)
      YOU should chage the code .If you do 't  send the attachment to the vendor ,you should set "Space ",jut like this :
      WHEN 'BUS2200'.
          CV_SMARTFORM = 'ZBBP_BID_INVITATION'.
          CV_SMARTFORM_MAIL = 'ZBBP_OUTPUT_COVER'.
          "exclude attachment
          CS_PARAMETERS-ATTACH_IND = SPACE.
       Then  the attachment will not been sent out ,you can try .
    Alex !
    Bestregards

  • Updating the OLD open items of a Customer in the Report Cash Man.& Forecast

    Hi All,
    I've filled the "Cash Managemeng Group" in the master data of a Customer.
    The report Cash Manag.& Forecast doesn't update its old open line Items.
    Only the documents successive to the insertion of the "Cash Managemeng Group" in the master data are updated in the report.
    Could anyone tell how to obtain all the items (old and new) in the report?
    Thanks
    Gandalf

    hi,
    you are correct in this regard, i have checked in detail, now i want to restrict the end user for clearing the customer in other currency than the required how i can do that, is it thru validation or some other configuration is required. pls help me. for this regard.
    anand

  • Line Item detail  in HFM in FR Reports

    Hi
    Is it possible to draw a report in FR to display the line item details as input in HFM?
    The users will be adding the line item details, and we want to have a report giving these entity wise using FR.
    Rgds

    Yes,
    Here are the steps
    Displaying Line Item Detail for Financial Management
    For Financial Management database connections, a Financial Management user can select if they want to display line item detail for rows only on Account dimensions. A user can also select the location of the line item detail; before or after the parent member of the line item detail. To display line item detail, all dimensions must be set to a Level 0 member.
    To display line item detail for Financial Management:
    Open a report and select a row in the grid.
    In the Row Properties Sheet, select Display Line Item Details.
    Optional: On the Grid Properties sheet, select the Position category and do one of the following in the Position of Line Item Detail box:
    To display line item detail before the parent member, click Before Members.
    To display line item detail after the parent member, click After Members. This is the default.

  • Under each line item i should get an underline

    In my smartforms under each line item i should get an underline,how to do it.

    Hi,
    i think you just want underlines but not horizontal lines.
    If you want underline check the paragraph which was already used for that item, create another paragraph
    format as your old one and select the underline optine for your new paragraph format in the style and assign the
    same paragraph where you exactly required.
    if you want horizontal lines.
    1). Select the pattern any if suitable to your requirement.
    2). In the text node you can write contiouns '_'.
    3). In the text node output options check the frame check box and in the pattern select upper line or bottom line
         but in table or template you can't select the frame check box.
    Thanks,
    Phani.

  • Few line items are not coming at the time of creation of delivery

    Dear Experts,
    When the user creating the delivery few line items are not picking in the delivery document
    the following checks i verified,
    Stock is available
    shpping condition is differ from sold to party and sales document
    Plants are same for all the line items
    why the few line items are not coming in the delivery document creation,
    please help me to sort out this issue
    Thanks and Best Regards,
    Muralidharan S

    Hi,
    Check below points.
    Point 1:
    When you create a delivery document, you create it for a Shipping Point.
    So whatever the line that came in to one delivery has determined same shipping point that you entered in VL01N screen.
    Others got a different shipping point and that's why it didn't come to the same delivery document.
    Shipping point determined based on below criteria
    - Shipping Condition - From customer master
    - Loading Group - Material
    - Plant  - Delivery Plant of the sales order line item
    You assign a proffered shipping point for above combination in configuration.
    If that combination is not find, those line items are not going in to the delivery.
    You can check the log of the delivery document for more information as well.
    Point 2:
    Check the line item Requested delivery date and the "Selection Date" you entered in the VL01N screen.
    Al  Requested delivery dates has to be on or before the  "Selection Date" you entered in the VL01N screen.
    Those line items which has a date more than that will dropped in the delivery.
    Best regards,
    Anupa

  • Line item and header records in the same infopackage

    Gurus,
    I wanted to check how can I make sure that I get all the line item documents in the same package with the header document record in the same infopackage? Is there some setting for that? If I am writing a custom extractore how can I make sure of this in ABAP?
    Thanks
    AK

    Dear AKBW,
    This is not very clear why you want to use same infopackage for line-item as well as header data. Normally there are 2 different datasources for line item and for header data.
    Say you are woking with Sales Order Data in ECC.
    So Line-item datasource for sales order data - 2LIS_11_VAITM
    and Header datasource for sales order data - 2LIS_11_VAHDR.
    Now as they are 2 different datasource, so you must need 2 different infopackages.
    Now if you have created one custom datasource in ECC, then just check if its extracting line-item level or header level data. Normally when we create any custom datasource, we try to make it line-item level, to have all the itemwise detail. Though its not mandatory.
    So if you have 2 different datasources (SAP or Custom), you definitely need 2 different infopackages.
    Please let me know, if you still have any more doubt. You can also give me the other detail of the custom datsource you are creating.( type, fields, what it is supposed to extract etc)..

  • Line item attachments were missing for the documents in FB03

    Hi all ,
    i had an issue that within the transaction FB03,  attachments for line items were missing for all the documents that were posted from zprogram (artist statement) but attachments for the header items were displayed .
    Is there any clue why these attachments are missing.
    help me out of this.................!

    Check that that document key has been specified correctly. How are you storing the attachments??

  • Missing Line Items and '?' Symbols in some Reports

    I have upgraded the patch level of my production server and patch level
    list is given below
    SAP_BASIS 640 0022 SAPKB64022
    SAP_ABA 640 0022 SAPKA64022
    ST-PI 003C_640 0001 SAPKITLPS1
    PI_BASIS 2006_1_6400006 SAPKIPYL06
    SAP_BW 350 0021 SAPKW35021
    SAP_HR 500 0017 SAPKE50017
    SAP_APPL 500 0019 SAPKH50019
    PI 2004_1_5000004 SAPKIPZI64
    problem is that whenever I run SAP FICO standard reports FL3N, FBL5N,
    KB01, F.08 etc it generates the report correctly but when i am taking
    print out of these reports it misses some line items and total value as
    well screen shots are attached for information.
    my second problem is that there are some garbage entries with
    symbol '?' in SAP Menu and toolbars of some Reports. Screen shot is
    also attached for your information.
    i am facing lots of problem in executing my daily operations due to
    these errors.
    regards,
    Majid Khan

    Dear Subramanian,
    I am facing the same problem in Development and Quality Assurance Server
    Regards,
    Majid Khan

  • PR Line Item Number should be Same for PO Line Item Numebr

    Hi Gurus,
    I have a rare Requiremenet. I will convert Only one PR to PO(So It is one to one) PR Item Number should Be Equal to PO Item Number.. can anybody suggest me is there any way to achive this.
    Explanation:
    Actually we will create third party Sale order and with A BAPI we  create PO in background.
    I will change Sales Order qty(Decrease directly or increse with schedule lines) so new PR items will be generated or Existing may be deleted. now i want my PR Item number should be equal to PO Item Number.
    In BAPI we have a provision to provide PR number still system is taking in sequential intervel of 10,20,30....
    How to overide this...
    EX:
                     PR               PO
    ItemNO      10              10
    ItemNO      30              30
    Thanks
    Pradeep

    Hi Monika,
    Thanks a lot my issue got resolved. annd i have another question regarding BAPI_PO_Change.
    Actually i am passing Price from PR to PO and i am making no_price_from_po while chenging PO and i am passing PRICE from SO to PO. Below scenario will explain My requirement.
    In third party we are creating Automatic PO from SO. we have developed one ZTrasaction for SO Approval in two stages, in second level Approval we are converting PR to PO.
    while creating we are able to pass Price value from SO to PO From Condition in the Pricing procedure.
    while changing we have 3 scenarios
    1.Changing Existing PR Item quantity
    2. Adding one more schedule line to the Existing SO so it will create one more PR Item
    3. we are adding one more Line Item in the SO in this case also one more PR Item will be generated
    we are able to convert each PR Item will be one PO line Item 
    But while changing we will have PO still we don't want to copy the Price from Previous Document.
    we have activated no_price_from_PO in the BAPI but still system is taking from previous Document.
    Pl suggest me if there anyway to over come this issue...
    Thanks
    -Pradeep

  • Line items records should display in 1 line (means header line)

    Hi,
    Suppose i have 5 line items in my report against 1 document number, now i want that  when i execute the report with that document number, it show only 1 line item and sum of all amounts (means of all line items) ...
    please let me know, how can i do it....

    Now i m sending my code for ur ref...
    Code----
    TABLES : bsik,bkpf,bseg,j_1imovend,lfa1,t001,t005u,bsak,ekko,bsis.
    DATA : BEGIN OF itab OCCURS 0,
           hkont LIKE bseg-hkont, "Gl account
           belnr LIKE bsik-belnr, "Document number
           gjahr LIKE bsik-gjahr, "Fiscal Year
           bldat LIKE bsik-bldat, "Document Date
           budat LIKE bsik-budat, "Posting Date
           mwskz LIKE bseg-mwskz, "Tax Code
           dmbtr LIKE bseg-dmbtr, "Amount
           buzei LIKE bseg-buzei, "line item
           lifnr LIKE bsik-lifnr, "Vendor number
           ebeln LIKE bseg-ebeln, "Purchasing Document
           ebelp LIKE bseg-ebelp, "line item nbr
           hwbas LIKE bseg-hwbas, "Base amount
           shkzg LIKE bseg-shkzg, "Debit/Credit code
           xblnr LIKE mkpf-xblnr, "Ven invoice nbr
           name1(25),                                           "name1
           ort01 LIKE lfa1-ort01,   "City
           j_1ilstno LIKE j_1imovend-j_1ilstno,  " Vendor tin nbr
           regio LIKE lfa1-regio, "Region Code
           bezei LIKE t005u-bezei, "Region desc
    END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0.
            INCLUDE STRUCTURE itab.
    DATA:END OF itab1.
    DATA : BEGIN OF itab2 OCCURS 0.
            INCLUDE STRUCTURE itab.
    DATA:END OF itab2.
    ***********************************Purchase order history
    DATA:   BEGIN OF bet OCCURS 50.
            INCLUDE STRUCTURE ekbe.
    DATA:   END OF bet.
    DATA:   BEGIN OF bzt OCCURS 50.
            INCLUDE STRUCTURE ekbz.
    DATA:   END OF bzt.
    DATA:   BEGIN OF betz OCCURS 50.
            INCLUDE STRUCTURE ekbez.
    DATA:   END OF betz.
    DATA:   BEGIN OF bets OCCURS 50.
            INCLUDE STRUCTURE ekbes.
    DATA:   END OF bets.
    DATA:   BEGIN OF xekbnk OCCURS 10.
            INCLUDE STRUCTURE ekbnk.
    DATA:   END OF xekbnk.
    TYPE-POOLS: slis.
    DATA: linecolor TYPE slis_specialcol_alv OCCURS 0 WITH HEADER LINE.
    DATA: alv_layout TYPE slis_layout_alv.
    DATA: fieldcat TYPE slis_t_fieldcat_alv,
          fieldcat_ln LIKE LINE OF fieldcat,
          sortcat TYPE slis_t_sortinfo_alv,
          sortcat_ln LIKE LINE OF sortcat,
          eventcat TYPE slis_t_event,
          eventcat_ln LIKE LINE OF eventcat,
          alv_print TYPE slis_print_alv.
    DATA :col_pos TYPE i.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME.
    PARAMETERS :  hkont LIKE bseg-hkont OBLIGATORY. "GL Code
    SELECT-OPTIONS : belnr FOR bsik-belnr, "Document number
                   gjahr FOR bsik-gjahr, "Fiscal Year
                   bldat FOR bsik-bldat, "Document date
                   budat FOR bsik-budat. "posting Date
    SELECTION-SCREEN END OF BLOCK a.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME.
    PARAMETERS: detail RADIOBUTTON GROUP gr1,
                summry RADIOBUTTON GROUP gr1.
    SELECTION-SCREEN END OF BLOCK b.
    SELECT DISTINCT hkont belnr gjahr bldat budat INTO CORRESPONDING FIELDS OF TABLE itab
                      FROM bsis
                      WHERE bukrs = '1000'
                      AND hkont = hkont
                      AND belnr IN belnr
                      AND gjahr IN gjahr
                      AND bldat IN bldat
                      AND budat IN budat.
    SORT itab BY belnr.
    LOOP AT itab.
      SELECT * FROM bseg WHERE belnr = itab-belnr
                                                   AND gjahr = itab-gjahr
                                                   AND bukrs = '1000'
                                                   AND ( ebeln <> ' ' OR hkont = hkont ).
        IF sy-subrc = 0.
          itab-buzei = bseg-buzei.
          itab-mwskz = bseg-mwskz.
          IF bseg-ebeln <> ' '.
            itab-ebeln = bseg-ebeln.
            itab-ebelp = bseg-ebelp.
            MODIFY itab.
          ENDIF.
          IF bseg-hkont = hkont.
            itab-shkzg = bseg-shkzg.
            itab-hwbas = bseg-hwbas.
            itab-dmbtr = bseg-dmbtr.
            IF itab-shkzg = 'H'.
              itab-dmbtr = itab-dmbtr * ( -1 ).
            ENDIF.
            MOVE-CORRESPONDING itab TO itab2.
            APPEND itab2.
          ENDIF.
        ENDIF.
      ENDSELECT.
    ENDLOOP.
    LOOP AT itab2.
      SELECT SINGLE * FROM ekko WHERE ebeln = itab2-ebeln.
      IF sy-subrc = 0.
        itab2-lifnr = ekko-lifnr.
      ENDIF.
      CALL FUNCTION 'ME_READ_HISTORY'
        EXPORTING
          ebeln  = itab2-ebeln
          ebelp  = itab2-ebelp
          webre  = 'X'
        TABLES
          xekbe  = bet
          xekbz  = bzt
          xekbes = bets
          xekbez = betz
          xekbnk = xekbnk.
      itab2-xblnr = bet-xblnr.
      SELECT SINGLE * FROM lfa1 WHERE lifnr = itab2-lifnr.
      itab2-name1 = lfa1-name1.
      itab2-ort01 = lfa1-ort01.
      itab2-regio = lfa1-regio.
      SELECT SINGLE * FROM t005u WHERE bland = itab2-regio
                                  AND spras = 'EN'
                                  AND land1 = 'IN'.
      itab2-bezei = t005u-bezei.
      SELECT SINGLE * FROM  j_1imovend WHERE lifnr = itab2-lifnr.
      IF sy-subrc = 0 .
        itab2-j_1ilstno = j_1imovend-j_1ilstno.  " Vendor tin nbr
      ENDIF.
      MODIFY itab2.
    ENDLOOP.
    PERFORM build_fieldcat1.
    PERFORM build_fieldcat2.
    PERFORM build_fieldcat3.
    PERFORM build_fieldcat4.
    PERFORM build_fieldcat5.
    PERFORM build_fieldcat6.
    PERFORM build_fieldcat7.
    PERFORM build_fieldcat7_1.
    PERFORM build_fieldcat8.
    PERFORM build_fieldcat9.
    PERFORM build_fieldcat10.
    PERFORM build_fieldcat11.
    PERFORM build_fieldcat12.
    PERFORM build_eventcat.
    PERFORM start_list_viewer.
    *&      Form  BUILD_EVENTCAT
          text
    -->  p1        text
    <--  p2        text
    FORM build_eventcat.
      eventcat_ln-name =  slis_ev_top_of_page.
      eventcat_ln-form = 'TOP_OF_PAGE'.
      APPEND eventcat_ln TO eventcat.
      APPEND eventcat_ln TO eventcat.
    ENDFORM.                    " BUILD_EVENTCAT
    *&      Form  START_LIST_VIEWER
          text
    -->  p1        text
    <--  p2        text
    FORM start_list_viewer.
      DATA: pgm LIKE sy-repid.
      pgm = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = pgm
         i_callback_user_command           = 'USER-COMMAND'
         it_fieldcat                       = fieldcat
         i_save                            = 'A'
         it_events                         = eventcat
        TABLES
          t_outtab                          = itab2
    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.
    ENDFORM.                    "start_list_viewer
          FORM build_fieldcat1                                          *
    FORM build_fieldcat1.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'BELNR'.
      fieldcat_ln-seltext_m       = 'Doc No'.
      fieldcat_ln-outputlen = '20'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT1
          FORM build_fieldcat2                                          *
    FORM build_fieldcat2.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'BLDAT'.
      fieldcat_ln-seltext_m       = 'Doc DATE'.
    fieldcat_ln-outputlen = '20'.
      fieldcat_ln-datatype  = 'DATS'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT2
          FORM build_fieldcat3                                          *
    FORM build_fieldcat3.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'BUDAT'.
      fieldcat_ln-seltext_m       = 'POSTING DT'.
    fieldcat_ln-outputlen = '20'.
      fieldcat_ln-datatype  = 'DATS'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT3
          FORM build_fieldcat4                                          *
    FORM build_fieldcat4.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'LIFNR'.
      fieldcat_ln-seltext_m       = 'VENDOR'.
      fieldcat_ln-outputlen = '10'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT4
          FORM build_fieldcat5                                          *
    FORM build_fieldcat5.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'NAME1'.
      fieldcat_ln-seltext_m       = 'Name'.
      fieldcat_ln-outputlen = '25'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT5
          FORM build_fieldcat6                                          *
    FORM build_fieldcat6.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'ORT01'.
      fieldcat_ln-seltext_m       = 'CITY'.
      fieldcat_ln-outputlen = '15'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT6
          FORM build_fieldcat7                                          *
    FORM build_fieldcat7.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'J_1ILSTNO'.
      fieldcat_ln-seltext_m       = 'TIN'.
      fieldcat_ln-outputlen = '25'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT7
          FORM build_fieldcat7_1                                        *
    FORM build_fieldcat7_1.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'BEZEI'.
      fieldcat_ln-seltext_m       = 'Region'.
      fieldcat_ln-outputlen = '15'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT7_1
          FORM build_fieldcat8                                          *
    FORM build_fieldcat8.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'MWSKZ'.
      fieldcat_ln-seltext_m       = 'Tax c'.
      fieldcat_ln-outputlen = '4'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT8
          FORM build_fieldcat9                                          *
    FORM build_fieldcat9.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'EBELN'.
      fieldcat_ln-seltext_m       = 'Purchase Ord'.
      fieldcat_ln-outputlen = '20'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT9
          FORM build_fieldcat10                                         *
    FORM build_fieldcat10.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'HWBAS'.
      fieldcat_ln-seltext_m       = 'Base Amount'.
      fieldcat_ln-outputlen = '15'.
      fieldcat_ln-datatype  = 'CURR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT10
          FORM build_fieldcat11                                         *
    FORM build_fieldcat11.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'DMBTR'.
      fieldcat_ln-seltext_m       = 'Tax amt'.
      fieldcat_ln-outputlen = '15'.
      fieldcat_ln-datatype  = 'CURR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT11
          FORM build_fieldcat12                                         *
    FORM build_fieldcat12.
      ADD 1 TO col_pos.
      fieldcat_ln-ref_tabname = 'ITAB2'.
      fieldcat_ln-fieldname   = 'XBLNR'.
      fieldcat_ln-seltext_m       = 'VEN INV no'.
      fieldcat_ln-outputlen = '20'.
      fieldcat_ln-datatype  = 'CHAR'.
      fieldcat_ln-key         =  space.
      fieldcat_ln-no_zero     = space.
      fieldcat_ln-do_sum      = space.
      fieldcat_ln-col_pos     = col_pos.
      fieldcat_ln-no_out      = space.
      fieldcat_ln-qfieldname  = space.
      fieldcat_ln-hotspot     = space.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    " BUILD_FIELDCAT12
          FORM TOP_OF_PAGE
    FORM top_of_page.
      PERFORM batch-heading.
    ENDFORM.                    "top_of_page
    *&      Form  BATCH-HEADING
          text
    -->  p1        text
    <--  p2        text
    FORM batch-heading.
      DATA: lc_laufd(10)  TYPE c,
            lc_text(100)  TYPE c,
            lc_text2(100) TYPE c,
            lc_text3(100)  TYPE c,
            lc_date(10) TYPE c,
            lc_date1(10) TYPE c,
            lc_date2(10) TYPE c.
      DATA: li_len  TYPE i,
            li_len2 TYPE i,
            li_len3 TYPE i,
            li_pos  TYPE i,
            li_pos2 TYPE i,
            li_pos3 TYPE i.
      WRITE sy-datum TO lc_date.
    write audat-low to lc_date1.
    write audat-high to lc_date2.
      lc_text = 'Purchases from Intrastate'.
    concatenate lc_text spmon_out into lc_text2
      CONCATENATE lc_text 'As On' lc_date INTO lc_text2
    concatenate lc_text 'From' lc_date1 'To' lc_date2 into lc_text2
      SEPARATED BY space .
      PERFORM read_t001 USING '1000'.
      lc_laufd = 'ZFI'.
      FORMAT INTENSIFIED ON.
    calculate output positions
      li_pos2 = sy-linsz - 25.
      li_pos3 = sy-linsz - 10.             " pos. for name, date, time
      li_pos  = sy-linsz / 2  - STRLEN( lc_text2 )  .
    *first line
      WRITE AT 1          t001-butxt.
    write at li_pos(75) lc_text2 .
      WRITE AT 40 lc_text2 .
      WRITE: AT li_pos2    sy-datum, ' /  '.
      WRITE AT li_pos3    sy-uzeit.
      NEW-LINE.
      WRITE  AT li_pos2 'Page'.
      WRITE  AT li_pos3 sy-pagno LEFT-JUSTIFIED.
      NEW-LINE.
      WRITE  AT li_pos2 lc_laufd .
      NEW-LINE.
    third line.
      lc_text3 = text-014.
      REPLACE '&BUKRS' WITH '1000' INTO lc_text3.
      WRITE AT 1 lc_text3.
      SKIP.
    ENDFORM.                    " BATCH-HEADING
          FORM READ_T001
    -->  P_PAR_ZBUK
    FORM read_t001 USING    p_par_zbuk.
      SELECT SINGLE * FROM t001 WHERE  bukrs =
    p_par_zbuk.
      IF sy-subrc NE 0.
        t001-butxt = space.
        t001-ort01 = space.
      ENDIF.
    ENDFORM.                                                    "read_t001
    Plz check that how can i use collect in it...

  • All Line Items need to send  in the PO Change EDI IDoC - ORDCHG

    Hi EDI Experts ,
    We have ECC 6.04.
    We are sending PO Change Message Tyep by using Message Type ORDCHG ( Basic Type ORDERS05)
    If PO Changes system trigger IDoc  and in Std IDoc it displays only that Line Item who had been changed .
    Requierment is that  if there is change in any single item, then  sytem should send entire/whole PO document ( all Line Items) .
    I think we need to write some code in teh routine /requierment ...etc.
    Can anyone suggest what I need to do to acehive the above ?
    Thanks
    NAP

    Hello NAP ,
         I have the same problem that you. I ´m using  the message type ORDCHG  with basic type ORDERS05.    when sending change order through Idoc only show me the updete/delete Item in segnment E1EDP01. 
    What object did you use for the message type ORDCHG ?
    What settings should I consider for this?
    Thanks in advance,
    Luis.-

  • According to PO number and Line item data should come once but its repeatin

    I am calculating IR Quantity and IR value......
    for a PO  if there are four same  line items i wanted them once but they are displaying for each and every line item
    If my po is 2003000151 and line item 0010 if both are same then i wanted ir quantity 500
    but its displaying like this
      PO                 item   IR
    2003000151   0010 500
    2003000151   0010 500
    2003000151   0010 500
    2003000151   0010 500
    I need like this
    2003000151   0010 500
    2003000151   0010
    2003000151   0010
    2003000151   0010
    If po number and line item are same IR quantity should be displayed only once..
    What should be done if it should not repeat in each and every line item if both PO and line item are same

    i am having internal table of it_ekko.
    in that i am having some data of PO no, Line Item,IR value and IR qty......
    i am having data like below.
    PO                        Line Item   IR Value    IR QTY 
    200310051          0010         1500           4500
    200310051          0010        1500           4500
    200310052         0010           0                   0
    200310052          0010       0               0
    now where ever IR value and IR qty is present i wanted that to display only once against that PO and line item
    i wanted like below
    PO                        Line Item   IR Value    IR QTY 
    200310051          0010         1500           4500
    200310051          0010            0              0
    200310052         0010             0                0
    200310052          0010            0               0
    Field names for IR value and IR Qty are Menge2 and dmbtr2.
    How to do that.........
    I cant use
    Delete adjacent duplicates of it_ekko by ebeln = wa_ekko-ebeln and
                                                                          ebelp = wa_ekko-ebelp.
    because i wanted that po and same line items , how many times it is like that only.....
    in it_ekko table i only wanted to delete duplicates of menge2 and dmbtr2.
    Pls suggest the code

  • When line item materials are same add the condition rate.

    HI!
    Im my smartform I am trying to get the unit price for the line items. There are are certain scenerions where my code faisl because the billing doc is prepared with multiple sales order which has several materials eneterd twice or thrice . SO as per my code the net value is getting added up for the identical materials but the condition rate is not adding up so when I do teh calculation to get the unit price it gives me wrong values. Like if theer are 3 materials in the billing doc with net price as 5000 each with eachs condition value for the tax is 500  then my code calucltes teh total for 3 items (identical ) as 150000 which is right but I have to substeract the condition value from this as teh condtion value is a tax and that is alreday included in teh net price so   we substarct, hence in this case it should do 15000 - 3*500 but unfortunately it does only 15000 - 500 , I beleive it takes the condition rate only for the last item found and substract that but i need to include all teh three items value so I get correct unit price.
    Following is teh code I used. I need to add functionality such that the gs_it_kond_w-kwert  gets added up each time the material number is same. so that i get the correct unit price.
    loop at  is_bil_invoice-it_kond into gs_it_kond_w where
          bil_number = wa_it_gen-bil_number and
          itm_number = wa_it_gen-itm_number .
        if gs_it_kond_w-kntyp = 'D'.
          gs_unit_price = ( gs_it_cont-netwr - gs_it_kond_w-kwert ) / gs_it_cont-fkimg.
          gs_it_cont-netwr = gs_unit_price * gs_it_cont-fkimg.
          is_bil_invoice-hd_gen-bil_netwr =  is_bil_invoice-hd_gen-bil_netwr  -  gs_it_kond_w-kwert .
        else.
          gs_unit_price = gs_it_cont-netwr / gs_it_cont-fkimg.
          is_bil_invoice-hd_gen-bil_netwr = is_bil_invoice-hd_gen-bil_netwr.
        endif.
      endloop.
      endif.
    Thanks

    Hi Aarav,
    I am not sure how your code behaves but, you can try following ways:
    1.  To ensure that if material for different line item is same, you can put a join on KONV, VBAK and VBAP as KONV-KNUMV = VBAK-KNUMV and VBAK-VBELN = VBAP-VBELN and KONV-KPOSN = VBAP-POSNR. After this, you can loop through the data extracted, sort it with material number and check for repeated materials and from KONV, you can get condition value and condition type etc.
    2.  To ensure that you are considering tax deductions each time a certain material is repeating, you can calculate net value at each material using its calculation type (KONV-KRECH) (percentage or fixed value) and condition value (KONV-KBETR or KONV-KWERT) without checking whether it is repeated or not. So, in the end, you will have exact net value and you will not miss any deduction.
    Let me know if this helps and also, for any clarifications.
    Gouri.

Maybe you are looking for