Adding field in cv01n-very urgent

hye all,
i am very new in screen exit can plz anybody send any document or any screen shot or link for adding date field in cv01n(dms).
thanks.

Hi,
  Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
the tcode is cmod...
1.From the main screen of the Project management transaction, proceed as follows:
Select Enhancement components and choose Change.
2.Choose Edit component.
3.Choose the screen exit and double click on it
4.Create your subscreen using the Screen Painter.
5.Design your screen to be added to the standard screen and activate the particular screen and return back to the flow logic .
6.Choose the PAI and PBO to write down the logic.
7.Generate your screen and choose Back (the green arrow) to return to the Project management transaction.
8.Go to the transaction ME22 to view the customer defined screen exit.
9.Enter the purchase order number and press Enter.
10.Go to the menu header --> Details.
11.Purchase number is visible on the standard screen
Regards

Similar Messages

  • Adding date field in cv01n very urgent

    hye all,
                  can plz anybody send any document or any screen shot or link for adding date field in cv01n(dms).
    mail id      [email protected]
    thanks.

    Hi Ankit,
    check exits for CV01
    Transaction Code - CV01                     Create Document Info Record                                                                               
    Exit Name           Description                                                                               
    CV000001            Check-in enhancement for document management                            
    CV110001            DMS: Enhancements for DMS Dialog (FB: CV110)                            
    CVDS0001            User exits for ALE DMS (DOCMAS)                                                                               
    No of Exits:          3      
    Rewards if useful..............
    Minal

  • Adding field in pa30 screen urgent

    hi all,
    i am new to user exits.
    and my requirement is to add a field in screen for PA30 tcode screen.
    so how i can go for this .
    if anyone has added fields in any SAP standard screen
    then plz give me the doc regd that with screen shots if u have otherwise give me the steps.
    my mail id is- [email protected]
    plz i am looking urgently for it.
    i will award all ur efforts.
    thanks
    sanjeev

    Screen Exit
    Please remove the TDS-related input fields on the PO entry screen on the customer data tab  (PO line details).
    - TDS account
    - TDS cost code
    - TDS sub code
    1.     Goto Transaction Code Me21n
    Fill the following fields
    Enter
    Give the input values in following fields from  ORGDATA TAB
    Purchasing org
    Purchasing group
    Company code
    Vendor
    Enter
    Select Customer Data tab like following
    USER EXIT  : MM06E005 (Customer fields in purchasing document )
      Goto  : T.Code : SMOD
         Give the Enhacement Name : MM06E005
         Click on Display
         Click on Components Push Button
         Double click on function module EXIT_SAPMM06E_016( Export Data to Customer Subscreen for Purchasing document item)
         Double click on Include ZXM06O01.
         Insert the following coding in that include
    SET PARAMETER ID 'BUK' FIELD g_ekko-bukrs.
      LOOP AT SCREEN.
        IF screen-name = 'EKPO_CI-ISMSUBTITLE1'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
    *>>>>>>>>>>>>>>>>>>>>>> Begin of insert CR336/BG1 >>>>>>>>>>>>>>>>>>>>>>
        IF screen-name = 'G_EAN11'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
    *<<<<<<<<<<<<<<<<<<<<<<< End of insert CR336/BG1 <<<<<<<<<<<<<<<<<<<<<<<
    *>>>>>>>>>>>>>>>>>> Begin of Changes for K896570/501411945 <<<<<<<<<<<<<
    IF screen-name = 'EKPO_CI-TDSACCOUNT'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
    IF screen-name = 'EKPO_CI-TDSCOST'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
    IF screen-name = 'EKPO_CI-TDSSUB'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
    *>>>>>>>>>>>>>>>>>> End of Changes for K896570/501411945 <<<<<<<<<<<<<
    *>>>>>>>>>>>>>>>>>>>>>> Begin of insert SM1 >>>>>>>>>>>>>>>>>>>>>>
        IF ( screen-name = 'EKPO_CI-TDSACCOUNT'
          OR screen-name = 'EKPO_CI-TDSCOST'
          OR screen-name = 'EKPO_CI-TDSSUB'
          OR screen-name = 'TDS_TXT_1'
          OR screen-name = 'TDS_TXT_2'
          OR screen-name = 'TDS_TXT_3'
          OR screen-name = 'TDSACCOUNT-DESC'
          OR screen-name = 'TDSCOST-DESC'
          OR screen-name = 'TDSSUB-DESC'  ).
          IF g_ekko-bukrs(2) <> 'U6'.       "not a theatrical company
            screen-invisible = '1'.
            screen-input     = '0'.
          ELSEIF g_flag = 0.                "display only
            screen-invisible = '0'.
            screen-input     = '0'.
          ELSEIF g_flag = 1.                "change
            screen-invisible = '0'.
    *>>>>>>>>>>>>>>>>>> Begin of Changes for K896570/501411945 <<<<<<<<<<<<<
           screen-input     = '1'.       "Fharook Syed
            screen-input     = '0'.        "Fharook Syed
    *>>>>>>>>>>>>>>>>>> End of Changes for K896570/501411945 <<<<<<<<<<<<<
          ENDIF.
          IF screen-name = 'EKPO_CI-TDSACCOUNT'.
            screen-required  = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
    *>>>>>>>>>>>>>>>>>>>>>> End of insert SM1 >>>>>>>>>>>>>>>>>>>>>>
    &#61664; save & activate.
    &#61664; Repeat the above process in ME21N to see customer data fileds in CUSTOMER DATA tab
    After the above Modifications CUSTOMER DATA is   displaying like this

  • Adding Custom fields to VL02N...very urgent

    Hi Friends,
    I have come up with a requirement, where i need to add 2 custom fields namely "EOD INDICATOR and FREIGHT AMOUNT" in a customized additional tab at the header level in VL02N transaction.I need to update the freight amount in the deliveries that are picked up by a report program where, the shipment number and the freight cost are the inputs. The problem is that, how to update the data in the delivery through VL02N and database.
    I found a BAPI, named "BAPI_OUTB_DELIVERY_CHANGE", where in at the header data we dont have fields for the custom fields i stated above. I want to know, how to enhance a BAPI, so that we can update the data for the outbound delivery and the database.
    In the BAPI, in tables I found EXTENSION1 and EXTENSION2 tables. Can I use these tables to update my fields?
    Let me know the way, like how to go ahead to update the customized fields in tcode using BAPI or some other way as soon as possible..it's very urgent..
    Thanks in advance..
    --sudha
    Edited by: sudha koduri on Jul 3, 2008 2:58 PM

    Check this thread:
    https://forums.sdn.sap.com/click.jspa?searchID=6422849&messageID=392261

  • Adding date field in cv01n

    hye all,
                i am very new in screen exit can plz anybody send any document or any screen shot or link for adding date field in cv01n(dms).
    thanks.

    Hi...
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    Screen exit
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    screen-exits

  • Searching for the fields of a table(very very urgent)

    Hi all,
    i am in graet trouble now.i am searching for the fields like
    1)country of origin where the finished good is created.
    2) customer sales order number
    3)customer sales order line number
    i am writing a report for delivery order.in this report i have to refer customer PO & customer SO .
      i mean, my company has a customer ( seagate) & seagate has a customer (let maxtor).initially maxtor will give a PO to seagate then seagate will raise a SO againest maxtor.
       Then seagate will send PO number(of maxtor), PO line number,SO number(seagate), SO line number(seagate) to our company.
       Then i have to write a report for sales order & delivery order.in these reports i have to refer seagate PO number & seagate SO number for reference.
    i got PO number as vbkd-bstkd but not getting any field for reference Sales order.plz advice me on this. it is very very urgent.
    ur idea is highly appreaciated.
    Thank u very much.
    Regards
    pabitra

    check out tables VBAK(sales order header), VBAP(sales items)

  • Not able to download the field names in GUI_DOWNLOAD(very urgent)

    Hi All,
    I am downloading the file contents to the presentation server.i am able to get the file contents proeprly but not able to download the field names into text file.
    Can anybody please help me in this issue..? its very urgent. Valuable answers will be rewarded.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = w_filename
          filetype                = 'DAT'
         write_field_seperator   = c_x
          col_select              = c_x
          COL_SELECT_MASK         = t_mask
        TABLES
          data_tab                = t_tab
          fieldnames              = t_colnames
        EXCEPTIONS
    Thanks & Regards,
    Satish.

    Hi,
    I have tried in both ways its not working.
    while a ran the program it is going to the dump.
    I am working in mySAP ECC6.0
    Can pl you suggest other way..
    Thanks & Regards,
    Satish.

  • Very Urgent : Reterival of AWKEY field from BKPF table

    Hi,
    I am making a report in which i have to make relation of 2 fields BKPF-AWKEY and MKPF-MBLNR . but the problem is i am not to reterive data from it as i have to make inner join among these fields so data can be reterived fmo these tables.
    plz provide me some guidelines as it is really urgent to me and help will be deinfately rewarded.

    First and foremost, i would advice you not to use words like VERY URGENT in your subject. You might want to go through the following link to understand the basic rules of the forum:
    [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    For your requirement, below code might help you understand the logic in determining the link between BKPF and MKPF.
    TYPES: BEGIN OF t_bkpf,
             bukrs type bukrs,
             belnr type belnr_d,
             gjahr TYPE gjahr,
             awtyp type awtyp,
             awkey type awkey,
            end of t_bkpf.
    types: begin of t_mkpf,
             mblnr type mblnr,
             mjahr type mjahr,
           end of t_mkpf.
    data: i_bkpf type STANDARD TABLE OF t_bkpf,
          i_mkpf type STANDARD TABLE OF t_mkpf.
    data: wa_bkpf type t_bkpf,
          wa_mkpf type t_mkpf.
    PARAMETERS: p_bukrs type bukrs OBLIGATORY,
                p_gjahr TYPE gjahr OBLIGATORY.
    START-OF-SELECTION.
      SELECT bukrs belnr gjahr awtyp awkey
        into table i_bkpf
        from bkpf
        UP TO 20 ROWS
        where bukrs = p_bukrs
        and   gjahr = p_gjahr
        and   awtyp = 'MKPF'.
    IF NOT i_bkpf[] is INITIAL.
       select mblnr mjahr from mkpf into table i_mkpf
          for ALL ENTRIES IN i_bkpf
         where mblnr = i_bkpf-awkey(10).
    *     and   mjahr = i_bkpf-awkey+10(4).
    ENDIF.
    LOOP AT i_bkpf into wa_bkpf.
      READ TABLE i_mkpf into wa_mkpf
        with key mblnr = wa_bkpf-awkey(10)
                 mjahr = wa_bkpf-awkey+10(4).
      IF sy-subrc eq 0.
         write:/ 'Accounting Document:', 23 wa_bkpf-belnr,
              35 'Material Document:', 55 wa_mkpf-mblnr.
      ENDIF.
    ENDLOOP.

  • Fields for table-----very very urgent

    Hi all,
    my company is following BAPI instead of IDOC for it's EDI immplementation.so i am writing a report for 856 signal(shipment notice).the procedure is like this.
    after shipment creation,i will download all the PO,SO & shipment data to a text file(edi format).then we will transfer this file to 3rd party EDI software.then that software will send that signal or file to our customer.
    i need some datas to download. but i am not getting those fields.you can find these fields in the 856 document of EDI.those field descriptions are like
    1)packaging code
    2)SCAC code
    3)shipment method of payment
    4)waybill number
    5)duns number
    6)entity identification code for customer
    7)measurement reference code for packing item (pallet)
    8)measurement qualifier for packing item like pallet
    9)title transfer date & title transfer time
    it is very very urgent.plz suggest.helpful answers will be rewarded.
    any suggestion will be highly appreaciated.
    Regards
    pabitra

    <b> ALV_GRID_DISPLAY, how to ovewrite subtotal obtained by ALV sort</b>
    I want to overwrite the subtotal value in column C (Currently 60 ) which i got using standard ALV sort.
    Example: using ALV_LIST_DISPLAY function module & sort functionality:
    Column-A____Column-B_____Column-C____Column-D
    K1____________2_____________10__________20
    K1____________2_____________20__________40
    K1____________3_____________30__________90
    subtotal:________7____________60_________150
    Note : Each row in Column C is calculated as D/B.
    I would like to extend the calculation in subtotals also.
    But subtotals give me the sum of values in C.
    In column C,I want 150/7 (subtotal of D / subtotal of B)
    I.E., Column C = 150 / 7 = 21.42.
    Any inputs regarding my problem would be much appreciated.
    Thanks in advance !!

  • Validation for Amount fields..very urgent

    hI ALL.
    I want Validation like     Right justify amount decimal point and 2 decimal places.
    this is Work area
    TYPES: BEGIN OF T_DATATAB,
              COL01(60) TYPE C,
              COL02(60) TYPE C,
              COL03(60) TYPE C,
                end of T_datatab.
    data: g_t_dbt like table of dbt initial size 10,
          wa_dbt type dbt.
    DATA : VAL TYPE STRING.
    Now i want  move value from VAL to wa_DBT-CURRENCY as follows,
            move wa_datatab-col07 to wa_DBT-CURRENCY.
            MOVE VAL TO wa_DBT-CURRENCY.
    so if i give input  100, i need display like 100.00
    Help me
    helpful answers will be get rewarded.it is very urgent
    Regards.
    Bhanu
    Message was edited by:
            bhanu

    Hi bhanu,
    1. simple
    2. just use
      WRITE numberfield to charfield.
    (it will put the field
       in the SAME FORMAT as DISPLAY FORMAT)
    eg. YYYYMMDD  will put as dd.mm.yyyyy
        256 will put as 256.00
    regards,
    amit m.

  • Prb in understanding fields of VBAK(ITS VERY URGENT)

    HI,
        Can u tell me, whats the diff. bet ORDER TYPE & SALES DOC CATEGORY.
    vbtyp & auart of vbak table
    is VBTYP = 'H' only dependent on AUART = 'ZRE'
    ZRE = RMA Returns...
    Its very urgent.......
    Regards,
    Parvez.

    Hi Parwez,
                        See AUART - is the Order Type which defines that it can a standard order ,Return Order ( ZRE) ,Order without charge ,Credit Memo ,Debit Memo.
    The sales document type determines how the system processes the sales
    document. For example, depending on the sales document type, the syste
    determines which screens to present and which data to ask you for.
    While SALES DOC CATEGORY VBTYP indicates it is a conctract ,sales order ,return order ,Purchase Order ,Schedule Agreement .
    A classification for the different types of documents that you can
    process in the sales and distribution system (for example: quotations,
    sales orders, deliveries, and invoices).
    The document category determines how the system stores and keeps track
    of document data. It enables the system to provide you with status
    information about delivery processing, billing, and documents that are
    used for reference (for example, inquiries and quotations).
    A     Inquiry
    B     Quotation
    C     Order
    D     Item proposal
    E     Scheduling agreement
    F     Scheduling agreement with external service agentI     Order w/o charge
    J     Delivery
    K     Credit memo request
    L     Debit memo request
    M     Invoice
    N     Invoice cancellation
    O     Credit memo
    P     Debit memo
    Q     WMS transfer order
    R     Goods movement
    S     Credit memo cancellation
    T     Returns delivery for order
    U     Pro forma invoice
    V     Purchase order
    W     Independent reqts plan
    X     Handling unit
    0     Master contract
    1     Sales activities (CAS)
    2     External transaction
    3     Invoice list
    4     Credit memo list
    5     Intercompany invoice
    6     Intercompany credit memo
    7     Delivery/shipping notification
    8     Shipment
    a     Shipment costs
    c     Unverified delivery
    e     Allocation table
    g     Rough Goods Receipt (only IS-Retail)
    h     Cancel goods issue
    i     Goods receipt
    j     JIT call
    r     TD Transport (only IS-Oil)
    s     Load confirmation, reposting (only IS-Oil)
    t     Gain    /  loss    (only IS-Oil)
    u     Reentry into storage (only IS-Oil)
    v     2-step Goods receipt (only IS-Oil)
    w     Reservation (only IS-Oil)
    x     Load confirmation, goods receipt (only IS-Oil)
    $     (AFS)
    Please Reward if useful .

  • Update Routine ... Help me Please--VERY URGENT

    Hi All ,
    I Moving data from Cube to ODS . Let me explain abt the records in the cube .
    There are 6 key figures in the cube as well as dimensions, UNIQKEY TRANSACTION is One Dimension and ARTICLE is another dimension which is having an Navigational attribute called CORE ELEMENT.
    I am showing the data with those two dimension and the key figures which are to be used in the routine.
    Charc----
    Key Figures
    UNIQKEY-ARTICLE-Coreelement--
    billqty     
    in base unit
    A00N----1006330--1--
    10.5
    A00M -
    1006320----2--
    2.5
    A00P-----1006330--1--
    10.5  
    A00P-----1006320--2--
    2.5
    A00Q-----1006320--2--
    2.5
    A00Q-----1006340--3--
    10.5
    Now Lets see what the core element numbers mean,
    core element 1 means -- fuel .
    Core elemnet other 1 -- food .   
    I need to move these data into ODS Which will have an extra field called No of items in the transaction --ITEMS.For this i need to write  a routine .
    The Logic is ...
    1.if Materail is of type 1(Means if the core element - 1)
    I need to Populate the No of items in tnx = 1 .--ITEMS.
    2.If Material is of type(Means if the core element)2or 3 I need to populate the billing quantity to the no of transcations.--ITEMS
    3. If the Uniqkey tanscation contains two line items as  suppose that you have 20 litres of fuel and 2 cans of coke, then No of Items in the transaction should be 3 and Billing Quantity in BUoM 22
    billing quantity in BUoM = 20 litres for the first line item and 2 for the second line item...
    then as the first line item is fuel, field No OF Items in the Transcation should be 1 (replacing the 20) + 2 = 3
    so the final result in the ODS should be billing quantity in BUoM = 22 and The Items in the Transcation= 3
    So the ODS Data should look like this.
    UNIQKEY--billqty--
    ITEMS
    in base unit 
    A00N--10.5--
    1
    A00M--2.5--
    2.5
    A00P--13--
    3.5
    A00Q--13--
    12.5  
    NOTE : IN the ODS only the UNIQKEY IS THE KEY FIELD and the rest are DATA FIELDS.
    I Posted this one before also. But didnt get proper responses.
    I am Pasting the piece of code which I have written . This code will work for the first two records in the cube , But it is failing for the UNIQKEY Transcation having Line items.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BI0/PMATERIAL.
    DATA: TITEMS LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS,
           CORE_ELEMENT like /BI0/PMATERIAL-RPA_WGH1.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS8ZPOCTUS04
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS
               RETURNCODE LIKE SY-SUBRC "Do not use!
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    check not COMM_STRUCTURE-material is initial.
      select SINGLE RPA_WGH1
            INTO CORE_ELEMENT
            from /BI0/PMATERIAL
            where
            material = COMM_STRUCTURE-material
            and  OBJVERS <>'D'.
       IF CORE_ELEMENT EQ '1'.
       TITEMS = '1'.
         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
             input         = titems
          IMPORTING
            OUTPUT        = titems
       ELSE.
       TITEMS = COMM_STRUCTURE-BILL_QTY.
       ENDIF.
    result value of the routine
      RESULT = TITEMS..
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    PLease give me ideas on how to acheive this . As I am not Aware of ABAP very well.. PLease try to give me the code. I hope one of you may got the same requirement before.
    Its very urgent and I need to deliver it today itself.
    Thanks in advance , you can mail me to [email protected]. If anybody intersted to discuss this Issue they can reach at +91 9845922955.

    Hi ,
    While I am moving the data from cube to ods . I need to create the update rules with cube -- 8cube . WHen i am doing this the billqty is a key figure in cube so that is not a problem but the ITEMS is not there in the cube ,SO for that I need to write a routine to populate that one.
    Its strange but the user what to analyse with the UNIQKEY transaction. And these objects will be added as navigational attributes to the Characteristic. as it acts as another dimension.
    He wants to laod these from ODS to Master data -Characteristic.
    to say for each transcation hpw many items are getting sold.
    Message was edited by: Nagarjuna Reddy
    ONce again thanks for the qucik replies
    Message was edited by: Nagarjuna Reddy

  • Error during GR(very very urgent)

    Hi all,
    i am using a developed program for GR.i used this program before.there was no error.but now i am facing error like
    <b>PO ordered quqntity exceeded by 18,000 EA.</b>.i am using <b>BAPI_GOODSMVT_CREATE</b> for goods transfer.
    In the selection screen, i am putting
    PO number- PO1
    material number- MAT
    GR quantity- 18,000
    delivery order-111
    i want to receive the material MAT of quantity 18,000 from that PO.initially i have ordered PO quntity as 1 lakh. Till now i have received 42,000 materials,now i try to receive 18,000 materials.but it is showing this type of error.
    This error is fired from the return parameter of that BAPI only.error having message class-M7 & error no-022
    is comming.
    i am giving my coding below.plz suggest where is the problem.it is very very urgent.recently my company has added some patches to update the SAP.is this the cause for that error.plz suggest.
    any idea will be highly appreaciated.
    Regards
    REPORT zmui001
           LINE-SIZE 140
           LINE-COUNT 65
           NO STANDARD PAGE HEADING.
    *-- DATA DECLARATION--
    *-- tables
    TABLES : ekpo,
                ekbe,
             marv.
    *--Includes
    INCLUDE : <icon>.                   " Include for Icons
    *-- Types
    TYPES : BEGIN OF t_mseg,
              ebeln LIKE ekko-ebeln,
              name1 LIKE lfa1-name1,
              lifnr LIKE lfa1-lifnr,
              eknam LIKE t024-eknam,
              mblnr LIKE mkpf-mblnr,
              matnr LIKE ekpo-matnr,
              maktx LIKE makt-maktx,
              lgort LIKE mseg-lgort,
              charg LIKE mseg-charg, "chg: 10/17/2005
              menge LIKE mseg-menge,
              budat LIKE mkpf-budat,
              bldat LIKE mkpf-bldat, " chg : 08/18/2003
              xblnr LIKE mkpf-xblnr,
              END OF t_mseg.
    DATA:  BEGIN OF t_ekbe,
              ebeln LIKE ekbe-ebeln,
              ebelp LIKE ekbe-ebelp,
              bwart LIKE ekbe-bwart,
              matnr LIKE ekbe-matnr,
              menge LIKE ekbe-menge,
              END OF t_ekbe,
              BEGIN OF t_ekpo,
              ebeln LIKE ekpo-ebeln,
              ebelp LIKE ekpo-ebelp,
              matnr LIKE ekpo-matnr,
              menge LIKE ekpo-menge,
              END OF t_ekpo.
    TYPES : BEGIN OF t_options.
            INCLUDE STRUCTURE itcpo.
    TYPES : END OF t_options.
    *--Internal tables
    DATA: BEGIN OF i_item OCCURS 50.    "Create Material Document Item
            INCLUDE STRUCTURE bapi2017_gm_item_create.
    DATA: END OF i_item .
    DATA: BEGIN OF i_return OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF i_return.
    DATA: BEGIN OF i_part OCCURS 0,     " Internal table for split data
            part(20),
          END OF i_part.
    DATA: BEGIN OF i_return1 OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE bapiret1.
    DATA: END OF i_return1.
    *-- Work areas
    DATA: BEGIN OF wa_header .       "Material Document Header Data
            INCLUDE STRUCTURE bapi2017_gm_head_01.
    DATA: END OF wa_header .
    DATA: BEGIN OF wa_return .       "Output Structure
            INCLUDE STRUCTURE bapi2017_gm_head_ret.
    DATA: END OF wa_return .
    *-- Work areas
    DATA: wa_mseg TYPE t_mseg,
             wa_ekbe LIKE t_ekbe,
             wa_ekpo  LIKE t_ekpo,
          wa_options TYPE t_options,
           i_ekbe LIKE STANDARD TABLE OF  t_ekbe,
            i_ekbe2 LIKE STANDARD TABLE OF  t_ekbe,
           i_ekpo  LIKE STANDARD TABLE OF  t_ekpo.
    *---Variables
    DATA: v_first,         " variable to get first digit
          v_set TYPE c,
          v_found TYPE p,
          v_menge TYPE p,
          v_ebeln LIKE ekko-ebeln,
          v_lifnr LIKE ekko-lifnr,
          v_belnr LIKE ekbe-belnr,
          v_postdate LIKE mkpf-budat,
          v_bukrs LIKE marv-bukrs,
          v_datum LIKE sy-datum,
          v_lgort LIKE mard-lgort,   " Stge. location
          v_bwart LIKE mseg-bwart,   " Movement type
          v_infnr LIKE eina-infnr,   " Info record no.
          v_ltsnr LIKE eina-ltsnr.
    *---Constants
    CONSTANTS: c_comma TYPE c VALUE ',',   " For splitting data at commas
               c_01(2) TYPE c VALUE '01',  " For movement code in Bapi
               c_b     TYPE c VALUE 'B',   " For mvt. Indicator in Bapi
               c_save(4) TYPE c VALUE 'SAVE', " For button text
               c_clear(5) TYPE c VALUE 'CLEAR', " For clear button
               c_mvmt(4) TYPE c VALUE 'MVMT',
               c_ok(2)   TYPE c VALUE 'OK',
               c_error(5) TYPE c VALUE 'Error'.
    *--SELECTION SCREEN DESIGN--
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS:     p_bar(75) ,  " Scanned data from barcode
                p_ebeln LIKE ekko-ebeln, " PO number
                p_matnr LIKE ekpo-matnr, " Material number
                p_menge LIKE ekpo-menge, " Quantity
               p_lifnr LIKE ekko-lifnr, " Vendor code
                p_frbnr LIKE mkpf-frbnr, " Reference doc for goods mvt
                p_status(5) TYPE c.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN PUSHBUTTON 15(10) v_save USER-COMMAND mvmt.
    SELECTION-SCREEN PUSHBUTTON 40(10) v_clear USER-COMMAND clear.
      INITIALIZATION -
    INITIALIZATION.
      v_save = c_save .
      v_clear = c_clear.
    *--AT SELECTION_SCREEN--
    AT SELECTION-SCREEN .
      IF sy-ucomm = c_clear.
        PERFORM f_clear.
      ELSE.
        IF sy-ucomm <> c_mvmt.
           if not  sy-tabix is initial and  sy-ucomm <> c_mvmt.
    *--- Extracting the data by splitting the scanned values.
          PERFORM f_get_split_data.
    *--- Validating the input data.
          PERFORM f_check_inputs.
        ELSE .
    *--- Validating the input data.
          PERFORM f_check_inputs.
    *-- Determining the posting date and period check.
          PERFORM f_get_posting_date.
    *---Post goods movement
          PERFORM f_post_receipt.
        ENDIF.
      ENDIF.
               SUBROUTINES                                               *
    *&      Form  f_check_inputs
        Validating the input parameters
    FORM f_check_inputs.
    *-- Validating material no.
      SELECT SINGLE matnr INTO p_matnr
        FROM mara
          WHERE matnr = p_matnr.
      IF sy-subrc = 4.
        p_status =  c_error.
        MESSAGE e003(zm) WITH 'Material no.'.
      ENDIF.
    *-- Validating JHT reference no.
      SELECT SINGLE ebeln
                    lifnr
                    bukrs
                    INTO (p_ebeln, v_lifnr , v_bukrs)
                    FROM ekko
            where unsez = p_unsez. chg:07072003
              WHERE ebeln = p_ebeln.
      IF sy-subrc = 4.
        p_status =  c_error.
        MESSAGE e003(zm) WITH 'Purchase order no.'.
      ENDIF.
    *-- Validating material po combination
      SELECT SINGLE *
           FROM ekpo
             WHERE ebeln = p_ebeln
               AND matnr = p_matnr.
      IF sy-subrc = 4.
        p_status =  c_error.
        MESSAGE e003(zm) WITH 'Purchase order no.' ' and Material no.'.
      ENDIF.
    *--- Checking for DO entry . (chng : 30/06/2003)
      IF  p_frbnr IS INITIAL.
        MESSAGE e018(m7) WITH 'Delivery no.'.
        p_status =  c_error.
        PERFORM f_clear.
      ENDIF.
    *-- Validating material po do combination
      SELECT SINGLE a~belnr
                    INTO v_belnr
                    FROM ekbe AS a
                      INNER JOIN mkpf AS b
                       ON   abelnr = bmblnr
                       AND agjahr = bmjahr
                      WHERE a~ebeln = ekpo-ebeln
                        AND  a~ebelp = ekpo-ebelp
                        AND  b~xblnr = p_frbnr.
      IF sy-subrc = 0.
        MESSAGE e019(zm) WITH v_belnr.
        p_status = c_error.
        PERFORM f_clear.
      ENDIF.
      p_status =  c_ok.
    ENDFORM.                    " f_check_inputs
    *&      Form  f_get_split_data
       Extracting the data by splitting the Scanned data
    FORM f_get_split_data.
    *-- Splitting the data at commas
      SPLIT p_bar AT c_comma INTO TABLE i_part.
    *-- Assigning the parts to variables.
      LOOP AT i_part.
        v_first = i_part-part+0(1).
        TRANSLATE  v_first TO UPPER CASE.
        CASE v_first .
         WHEN 'V'.
           p_lifnr =  i_part-part+1(10).
          WHEN 'P'.
            p_matnr = i_part-part+1(18).
          WHEN 'Q'.
            p_menge = i_part-part+1(13).
          WHEN 'K'.
            p_ebeln = i_part-part+1(10).
          WHEN 'D'.
            p_frbnr = i_part-part+2(16).
          WHEN OTHERS.
            CONTINUE.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    " f_get_split_data
    *&      Form  f_get_posting_date
    Determing the posting date for document
    FORM f_get_posting_date.
    *-- get the current period for todays date.
      DATA: l_period LIKE t009b-poper.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
        EXPORTING
          i_date               = sy-datum
          i_periv              = 'K4'
       IMPORTING
         e_buper               = l_period
      E_GJAHR              =
       EXCEPTIONS
         input_false          = 1
         t009_notfound        = 2
         t009b_notfound       = 3
         OTHERS               = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *-- Determining whether the open period
      SELECT SINGLE *
                    FROM marv
                    WHERE bukrs = v_bukrs.
      IF sy-subrc = 0.
        IF l_period = marv-lfmon .
          v_postdate = sy-datum.
        ELSE.
          CALL FUNCTION 'BAPI_CCODE_GET_FIRSTDAY_PERIOD'
               EXPORTING
                    companycodeid       = v_bukrs
                    fiscal_period       = marv-lfmon
                    fiscal_year         = marv-lfgja
               IMPORTING
                    first_day_of_period = v_postdate
                    return              = i_return1.
          IF NOT i_return[] IS INITIAL.
            LOOP AT i_return1.
              MESSAGE i016(zm) WITH i_return-message.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_get_posting_date
    *&      Form  f_post_receipt
    Post the goods receipt for entered data.
    FORM f_post_receipt.
      PERFORM f_fill_item.
      PERFORM f_fill_header.
      PERFORM f_execute_transfer.
      PERFORM f_clear.
    ENDFORM.                    " f_post_receipt
    *&      Form  f_fill_item
      Updating the item data for the GR
    FORM f_fill_item.
    Checking for IQC cycle is done here.(chng : 23/07/2003)
      PERFORM f_check_iqc.
    *---- Assigning movement type as per IQC cycle.(chng : 23/07/2003)
      IF v_lgort IS INITIAL.
        MOVE '101'   TO i_item-move_type.
        SELECT SINGLE lgort INTO i_item-stge_loc
        FROM ekpo
         where ebeln  = v_ebeln and  " chg :07/07/2003
           WHERE ebeln  = p_ebeln AND
               matnr = p_matnr .
      ELSE.
        MOVE v_lgort TO i_item-stge_loc.
        MOVE v_bwart TO i_item-move_type.
      ENDIF.
      MOVE p_matnr TO i_item-material.
      MOVE p_menge TO i_item-entry_qnt.
    move v_ebeln to i_item-po_number. " 07/07/2003
      MOVE p_ebeln TO i_item-po_number.
      MOVE v_lifnr TO i_item-vendor.
      MOVE c_b TO i_item-mvt_ind.
    select single ebelp into i_item-po_item " chg :29/07/2003
       from ekpo
          where ebeln  = p_ebeln
            and   matnr = p_matnr
           and elikz = ''.
      SELECT ebeln
                ebelp
                matnr
                menge
                INTO CORRESPONDING FIELDS OF TABLE i_ekpo
                FROM ekpo
                WHERE ebeln = p_ebeln
                   AND matnr = p_matnr
                   AND loekz = '' .
      SORT i_ekpo BY ebeln ebelp matnr.
      LOOP AT i_ekpo INTO wa_ekpo.
        IF v_found = 0.
          SELECT ebeln  ebelp
                bwart  menge
                INTO CORRESPONDING FIELDS OF TABLE i_ekbe
                FROM ekbe
                WHERE ebeln = p_ebeln
                AND ebelp = wa_ekpo-ebelp
                AND matnr = p_matnr.
                          and elikz = '' .  CHG -- 03/19/2004
          IF sy-subrc = 0.
            LOOP AT i_ekbe INTO wa_ekbe .
              IF wa_ekbe-bwart = '101'.
                v_menge = v_menge + wa_ekbe-menge.
              ENDIF.
              IF wa_ekbe-bwart = '102'.
                v_menge = v_menge - wa_ekbe-menge.
              ENDIF.
              IF wa_ekbe-bwart = '122'.
                v_menge = v_menge - wa_ekbe-menge.
              ENDIF.
            ENDLOOP.
    chng: 03/19/2004 compare po qty against receipt
            v_menge = v_menge + p_menge .
            IF wa_ekpo-menge >= v_menge .
              v_found = 1.
              MOVE wa_ekpo-ebelp TO i_item-po_item.
            ENDIF.
          ELSE .
            v_found = 1.
            MOVE wa_ekpo-ebelp TO i_item-po_item.
          ENDIF.
        ENDIF.
        CLEAR : wa_ekbe, i_ekbe, v_menge.
      ENDLOOP.
      IF v_found = 0 .
        MESSAGE e003(zm) WITH ' delivery items'.
      ENDIF.
      APPEND i_item.
      CLEAR : i_item, v_found .
    ENDFORM.                    " f_fill_item
    *&      Form  f_check_iqc
    Checking the storage location for the (chng : 23/07/2003)
    FORM f_check_iqc.
      CALL FUNCTION 'Z_M_GET_IQC_STATUS'
           EXPORTING
                matnr          = p_matnr
                lifnr          = v_lifnr
           IMPORTING
                lgort          = v_lgort
                bwart          = v_bwart
                ltsnr          = v_ltsnr
                infnr          = v_infnr
           EXCEPTIONS
                non_iqc_vendor = 1
                OTHERS         = 2.
      IF sy-subrc <> 0.
        CLEAR : v_lgort , v_bwart , v_ltsnr.
      ENDIF.
    ENDFORM.                    " f_check_iqc
    *&      Form  f_fill_header
      Updating data in the header
    FORM f_fill_header.
      MOVE v_postdate TO wa_header-pstng_date.
      MOVE sy-datum TO wa_header-doc_date.
      MOVE p_frbnr TO wa_header-ref_doc_no.
    ENDFORM.                    " f_fill_header
    *&      Form  f_execute_transfer
          Executing the goods movement.
    FORM f_execute_transfer.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
           EXPORTING
                goodsmvt_header  = wa_header
                goodsmvt_code    = c_01
           IMPORTING
                goodsmvt_headret = wa_return
           TABLES
                goodsmvt_item    = i_item
                return           = i_return.
      IF i_return[] IS INITIAL .
        COMMIT WORK.
    *---  UPdating Info record for IQC cycle ind.(chng : 23/07/2003)
        IF NOT v_ltsnr IS INITIAL.
          UPDATE eina SET ltsnr = v_ltsnr
          WHERE infnr = v_infnr.
        ENDIF.
        REFRESH : i_item.
        CLEAR : wa_header,v_ltsnr , v_infnr,v_bwart,v_lifnr.
        MESSAGE i012(migo) WITH wa_return-mat_doc.
        PERFORM f_do_print.
      ELSE.
        REFRESH : i_item.
        CLEAR : wa_header,v_ltsnr , v_infnr,v_bwart,v_lifnr.
        PERFORM write_errors.
      ENDIF.
    ENDFORM.                    " f_execute_transfer
    FORM write_errors.
      WRITE: 0(90) sy-uline ,
             /0'|',
              3 'System messages for GR posting',
              90 '|',
             /0(90) sy-uline .
      LOOP AT i_return.
        CASE  i_return-type.
          WHEN 'E'.
            MESSAGE i016(zm) WITH i_return-message.
          WHEN 'W'.
            MESSAGE i017(zm) WITH i_return-message.
          WHEN 'I'.
           WRITE: /0'|',
                  icon_yellow_light AS ICON ,
                  '|',
                  10 i_return-message,
                  90 '|'.
            MESSAGE i018(zm) WITH i_return-message.
          WHEN 'S'.
           WRITE: /0'|',
                  icon_green_light AS ICON ,
                  '|',
                  10 i_return-message,
                  90 '|'.
            MESSAGE i018(zm) WITH i_return-message.
          WHEN OTHERS.
           WRITE: /0'|',
                  icon_red_light AS ICON ,
                  '|',
                  10 i_return-message,
                  90 '|'.
            MESSAGE e016(zm) WITH i_return-message.
        ENDCASE.
       AT LAST .
         WRITE:/0(90) sy-uline .
       ENDAT.
      ENDLOOP.
    ENDFORM.                    " write_errors
    *&      Form  f_clear
    Clearing the input parameters
    FORM f_clear.
      CLEAR : p_ebeln ,
              p_bar,
              p_matnr,
              p_frbnr,
              v_lifnr,
              p_menge,
              p_status.

    Hi all,
    can anyone suggest any idea?
    Regrds
    pabitra

  • Very urgent --pls help Report Painter Problem,

    Hi to all,
    I have created  5 operating expenses report by cost centres through report painter. some for full period , some for actual and sone for budget.
    Under one set of that cost centre reports I have many subsets under which there are cost centre groups and then the cost centres.
    I want to add one more set to existing set. I have added the set and set contains one cost centre group and their are also cost centres under it.
    The table  which i am using for cost centre grous is GLT1 and field is RCNTR and for cost centres it is CCSS and KOSTL respectively.
    In the above procedure I have two queries.
    1)even after adding the set and when i try to execute the report from T- code SERP it doesnot show my created set in variation.
    2)Also even if it was showing the set earlier but report was showing zero values. When i clicked on zero amount a pop up arises for plan and actual values and when i clicked on plan values it had value of Rs 255000(for cost centres). then outside why this amount doesnot appears.
    PLS THIS IS VERY VERY URGENT
    Regards
    TANUJA

    I've just read this thread three times and I have absolutely no idea what you are doing, in what version, and what you are asking for help with.
    Do you want to change the message type? If you do you MUST drop the queue and start over again from the beginning.
    Do you want to enqueue messages?
    Post your DDL and other relevant information or you are on your own. We can not guess at your issue.

  • Very Urgent - Transient attribute setting and getting problems

    Hi,
    I am using a DFF to set date but since DFF can store only varchar data and I need date datatype for the same,
    I have create a EO based on per_all_people_f table of HRMS.
    Then I created a VO based on this EO and added a column to_date(substr(attribute11,1,10), 'RRRR/MM/DD') to get a date column so that I can display date calendar on my OAF page.
    Then I created a page based on this VO and creaed a table region and selected this new column instead of attribute11 column.
    A date field is diaplayed on the page but when I use calendar to set date for this field and try to get the value in processFormRequest, I get null instead of actual date.
    Its really very urgent. I wadted lot of my time on this but could not find any solution.
    Please help...

    Hi,
    Thanks for the reply and sorry I could not check your reply due to some personal proble.
    Anyway, I have used Standard Date value set for attribute11 field but since datatype of the attribute field is 'VARCHAR2', in EO and hence in VO, it is taking datatype as VARCHAR2.
    Thanks

Maybe you are looking for

  • Problems generating csv using bat.xlt in CUCM 8.6.2

    Hello gentlemen I`m having some difficulties generating csv from the bat.xlt file downloaded from my CUCM publisher using excel 2010 I download the file, enable editing and macros, I hit the "create file format" button to generate the columns I need,

  • MDX query issue - get key instead of text

    Hello, My BW query contain single row of type 0FUNDS_CTR that should be display key and not text. When query is running from query designer I can see the key in the results. But, when I try to get the results of MDX statemet on this query I see the t

  • Cannot insert a PDF as an object in Microsoft Word

    Hello: I am using Adobe Acrobat Pro 9.0. When I tried to insert a PDF into a Word document, I get the following error message: I am able to create a PDF. What am I doing wrong and how do I resolve this issue? Venki

  • Will Apple ever release a pro-vesion of iWeb?

    For photos you have iPhoto or Aperture, for movies you have iMovie or FinalCut Pro, how about a pro-version of iWeb that has both the features available now and also the ability to view in HTML for more robust editing without using separate tools.

  • Inserting root node to enable 1...n

    I am doing IDOC - file scenario I have a DT already created at the receiver end what do I have to do inorder to recieve mutliple instances of IDOC in receiver ( 1.... n  )? I am planning to create a root node with 1...1 and make the fileds 0...unboun