Very Urgent COOIS Selection Profiles

Dear All
I need a urgent help !!!! Please Kindly Help me into this
My client have a scenario where he wants to extract the Production order's only "REL" status with combination of Work-center
When we have choose the condition selecting the option of selection profiles and i have taken( SAP001 & SAP0011 )
And my doubt is when i am using SAP001 i am getting orders "REL" status but only i am able to display some orders one order
And When i am using SAP011 i am getting two orders and date range is same
How to achieve this i want to extract orders with "REL" status with combination of Work center
And i am using sys status CTRD Exclude enable & execute it will display only order release  but its throwing an error in sys status is not unique
What is SAP001 is Dispatched means what?
Is there any BUG in the COOIS or need any sap notes
Please help me i am in great need
With Regards
Vasudeva

Go to BS42 and configure your own Z profile if the standard profile didn't meet your requirement.
The reason SAP011 is displaying two orders may be because one of the two order is not dispatched.
SAP011 display orders with operations =REL & ≠LKD.
SAP001 displays orders with operations = DSPT

Similar Messages

  • SQL SELECT Query Help   ..Please its very Urgent!!

    Hi All,
    I am having Oracle Database whice is storing 1000's of records daily.
    I need to select some information based on date and time.
    I am having two coloumns for Date and time. The first column(testDate) of type Date stores date as MM/DD/YY format and the second column(testTime)of type Numeric stores the time in seconds.
    The Example data is :
    testDate ------=-- testTime
    11/12/2002 --- 35000
    11/12/2002 --- 43000
    11/12/2002 --- 45000
    11/12/2002 --- 75000
    11/13/2002 --- 2000
    11/13/2002 --- 3500
    11/13/2002 --- 4300
    11/13/2002 --- 9800
    11/13/2002 --- 23000
    11/14/2002 --- 5000
    11/14/2002 --- 10000
    11/14/2002 --- 15000
    How can i write a SELECT Query to get the records of specific date and seconds to next day specific date and seconds.I mean i want all the records between 11/12/2002 --- 43000 seconds to 11/14/2002 --- 1000 seconds.
    If any one helps me in this regard iam very thank full to them.Its very urgent for me.
    Thanks

    Hi m7nra,
    I used the query as
    SELECT * FROM table
    WHERE testDate + (testTime/(24*60*60)) BETWEEN TO_DATE('MM/DD/YYYY','12.11.2002') AND TO_DATE('MM/DD/YYYY','14.11.2002')
    its giving DATE FORMAT NOT RECOGNIZED error.
    The Example data is :
    testDate ------=-- testTime
    11/12/2002 --- 35000
    11/12/2002 --- 43000
    11/12/2002 --- 45000
    11/12/2002 --- 75000
    11/13/2002 --- 2000
    11/13/2002 --- 3500
    11/13/2002 --- 4300
    11/13/2002 --- 9800
    11/13/2002 --- 23000
    11/14/2002 --- 5000
    11/14/2002 --- 10000
    11/14/2002 --- 15000
    infact i need all the records between 11/12/2002 --- 43000 seconds to 11/14/2002 --- 1000 seconds.
    Please help me to find a full query beacuse iam very new to Oracle.
    Thanks,
    S R Mannava

  • Getting Exception in the select clause - Very Urgent

    Hi,
        I have given the below statement but it is showing the exception.
      SELECT *
             FROM (lv_tab_name)
             INTO CORRESPONDING FIELDS OF TABLE <fs_1>.
    If I execute the above select statement it is showing the below exception.
    Exception CX_SY_NO_HANDLER triggered.
    An exception with the type CX_SY_OPEN_SQL_DB occurred.
    It is working very well if I mention the few field names.
    Please let me know the possible reasons.
    Thanks,
    Suvin

    Thanks much for your quick response.
    I have tried with what you mentioned but it is not working.
    Please find my code below.
    *Declarations
    DATA: ddfields TYPE STANDARD TABLE OF ddfield.
      DATA: ls_ddfields TYPE ddfield.
      DATA: lt TYPE lvc_t_fcat.
      DATA: ls TYPE lvc_s_fcat.
      DATA: lv_tab_name TYPE dd02l-tabname.
    Data References
      DATA: lt_data TYPE REF TO data.
      DATA: new_line TYPE REF TO data.
    Field Symbols
      FIELD-SYMBOLS: <fs_1> TYPE ANY TABLE.
      FIELD-SYMBOLS: <fs_data> TYPE REF TO data.
      FIELD-SYMBOLS: <fs_2> TYPE ANY,
                     <l_field> TYPE ANY.
    Get the fields of the database table, here i am passing the table name
      CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'
        EXPORTING
      KEYFIELDS       = 'X'
      NULLABLE        = 'X'
            tabname        = lv_tab_name
        TABLES
            ddfields        = ddfields.
      LOOP AT ddfields INTO ls_ddfields.
        ls-fieldname = ls_ddfields-fieldname.
        APPEND ls TO lt.
      ENDLOOP.
    *Assigning Field-Symbol to our dynamic internal table
      ASSIGN lt_data TO <fs_data>.
    Calling the method CREATE_DYNAMIC_TABLE
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = lt
        IMPORTING
          ep_table                  = <fs_data>
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc EQ 0.
        ASSIGN <fs_data>->* TO <fs_1>.
    Create a work area for the dynamic table.
        CREATE DATA new_line LIKE LINE OF <fs_1>.
    A field-symbol to access that work area
        ASSIGN new_line->*  TO <fs_2>.
      ENDIF.
    Selecting the Data from the respective table.
      SELECT *
             FROM (lv_tab_name)
             INTO CORRESPONDING FIELDS OF TABLE <fs_1>.
    Please advise..it is very urgent.
    Thanks,
    Suvin

  • Very Urgent!...regarding selection criterion in Info Packages

    Hi all,
         This is very urgent requirement for the project now. Is there any way to indicate a field in selection criterion of a IP as blank.
    Like if I want to select all the records which have a field 0WBS_element as blank from one ODS into another ODS. How do I indicate it in the IP( any solution apart from writing a routine!)
    cheers
    Sudhir

    Hi Sudhir,
      Pls. refer to the earlier posted forums :
    Rotuine in Infopackage for Data Selection---- Urgent
    Thanks,
    Raj

  • Selection profile field in COOIS transaction to use in custom program

    I need to use the field selection profile in the transaction COOIS in a custom report .How can we do that ?

    The program for this tcode is PPIO_ENTRY
    in that you see that the  include  program ' ppio_entry_sel_criteria.'
    contains the logic for your request.
    copy the same in your custom program.

  • Table for process order &Selection profile status  details -reg

    Hi ,
    From which tabel we can get the link between the process order and selection status profile (like SAP001 etc..
    When we input the process orders we should get the selection status profiel linked to it
    Regards,
    Madhu Kiran

    Hi,
    The tables JEST and JSTO  are related to status profile .
    What i need is of Selection Profile
    You can see this field in COOIS or COOISPI  just above the Sys Status field
    We need this urgently
    Can any one help ?
    Madhu Kiran

  • Need help, MMC tree got deleted, very urgent.

    Hi,
    My sap MMC tree, got deleted in the server. I have been trying to restore since 2 days and couldnt succeed, please help me.
    1) i have uncared the sapmmc.sar from   Kernal\NT\I386\MMC\sapmmc.sar file
    2) i got about 7 files, in which there is one sapmmc file i have tried to double click it, n check but no go.
    3) i also tried to run the Sapstartsrv.exe file and fill in up the values in pop up window. & filled up the following values :-
                        SID: DEV
                        NR: 00
                        StartProfile:  (entire start profile path given)
                        user: devadm
                        passwd; (given)
    - but it says "the account name is invalid or does not exist or the password is invalid for account name specified"/
    - no go in both the cases.
    Please need help very urgent.
    Regards,
    Satish.

    siva,
    I am getting same error since 2 days
    SID: DEV
    NR: 00
    Start Profile: (entire start profile path)
    User: <hostname>/devadm
    passwd: ****
    Error:
    cannot install service
    create service failed:421
    The account name is invalid or doesnot exist, or the passwd is invalid for the account name specified.
    Edited by: satish c on Jun 4, 2008 11:12 AM

  • 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

  • UPDATE ROUTINE --- CUBE --- ODS Very Very URGENT

    Hi Collegues/Friends ,
    First I need to thank for the intiators of this site , as I came to know that for many
    problems we will get different best solutions ... Hoping the same I am posting a question
    which is very very very urgent as the client is running after me for this .
    My Requirement is as Follows. ..
    I Moving the data from Cube to ODS . While i need to write a routine for an extra field in
    ODS based on Billing Quantity in Base Unit of Measure . The Key Field in the ODS Is UNIQKEY
    Transaction and It is a Characterstic in the Cube and we have MAterial as another
    Characteristic  and core element as navigational attribute .
    In the Cube for every UNIQKEY transaction- there are more than One line items. 
    My data fields in the ODS are Billing Quantity in Base Unit of MEasure and and EXTRA FIELD
    : No of Items in Transaction . But the thing is that I have only Billing Quantity in Base
    Unit of Measure in cube as a key figure
    BAsing on the UNIQKEY transcation and Billing Quantity In Base Unit Of Measure I need to
    populate the No of Items in Transaction... For this i need to write a routine .
    Let suppose say that for the Materials the core elements are as follows
    Material  Core element
    10         1 -- fuel -- In liters
    20         2 -- Cigar - in PAck
    30         3 -- Coke - in Cans
    Now Lets see how the records are there in InfoCUbe
    Uniqkey  /  Material  / Core element /Billin Quantiy
    A          /   10      /     1        /    22
    B          /   30      /     3        /    2
    C          /   10      /    1         /  15
    C          /   30      /     3        /     2
    D          /   20      /     2        /    10
    D          /   30      /     3        /    2
    And IN the ODS -- I need to Populate the No OF items in Transaction.
    the Logic behind this as follows .
    1.if Materail is of type  1(Mean if the core element - 1)
    I need to Populate the No of items in tnx = 1
    2.If Material id of type 2 or 3 I need to populate the billing quantity to the no of
    transcations.
    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
    For this I have Written a Rouinte like this for that field
    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         -
    Does it satisfy all the conditions ?? mentioned above if . As far As i know as the only key
    field in the transcation it will satisfy the first two conditions .
    I want to know or If possioble anybody pls take some pain for me to send the code or any
    Ideas for satisfying all the conditions.
    Hope I will get immediate replies....
    Mail me to [email protected]

    Reddy,
    Please do not post in all sections ... makes it hard to follow up on posts..
    Arun

  • Open items for purchase order its very urgent

    hi
    my requirement is to write extract program for purchase order(me21) to extract only open items.
    please provide sample code its very urgent.
    thanks in advance.
    points will be rewarded.
    thanks
    hari prasad reddy

    check the below report :
    REPORT ZMM_OPEN_PO_REPORT no standard page heading
                              line-size 255
                              message-id zwave.
    ======================================================================
    Program Name : ZMM_OPEN_PO_REPORT                                    *
    Description  : This report displays all Open PO Items and output     *
                   would be PO Number,Material number and so on          *
    Author       : Seshu                                                 *
    Date         : 01/24/2007                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    --|||--
    01/24/07| Seshu    | DEVK921979 | Initial                            *
    D A T A  D E C L A R A T I O N   P A R T                         ***
    type-pools
    type-pools : slis.
    Tables
    tables : ekko, " Purchase order Header
             ekpo, " Purchase order Item
             marc. " Material with Plant data
    Internal table for output.
    data : begin of i_output occurs 0,
           ebeln like ekko-ebeln,
           matnr like ekpo-matnr,
           end of i_output.
    ALV Data declaration.
    data : v_repid like sy-repid.
      ALV Function Module Variables
    DATA: gs_layout type slis_layout_alv,
          g_exit_caused_by_caller,
          gs_exit_caused_by_user type slis_exit_by_user.
    DATA: gt_fieldcat    type slis_t_fieldcat_alv,
          gs_print       type slis_print_alv,
          gt_events      type slis_t_event,
          gt_list_top_of_page type slis_t_listheader,
          g_status_set   type slis_formname value 'PF_STATUS_SET',
          g_user_command type slis_formname value 'USER_COMMAND',
          g_top_of_page  type slis_formname value 'TOP_OF_PAGE',
          g_top_of_list  type slis_formname value 'TOP_OF_LIST',
          g_end_of_list  type slis_formname value 'END_OF_LIST',
          g_variant LIKE disvariant,
          g_save(1) TYPE c,
          g_tabname_header TYPE slis_tabname,
          g_tabname_item   TYPE slis_tabname,
          g_exit(1) TYPE c,
          gx_variant LIKE disvariant.
    data : gr_layout_bck type slis_layout_alv.
    Ranges
    ranges r_eindt for eket-eindt.
    initialization.
    v_repid = sy-repid.
    start-of-selection.
    Get the data from EKKO ,EKPO and MARC Table
    perform get_data_tables.
    end-of-selection.
    display the data in the form of ALV
    perform display_data.
    *&      Form  get_data_tables
          Get the data from EKKO,EKPO and MARC Table
    FORM get_data_tables.
    clear : i_output.
    refresh : i_output.
    fill the dates in ranges
    r_eindt-low = sy-datum - 7.
    r_eindt-high = sy-datum + 14.
    r_eindt-option = 'BT'.
    r_eindt-sign = 'I'.
    append r_eindt.
    Get the data from EKKO,EKPO and EKET Tables
    select aebeln bmatnr into table i_output
                           from ekko as a inner join
                                ekpo as b on aebeln = bebeln
                                inner join marc as c on cmatnr = bmatnr
                                inner join mara as d on dmatnr = bmatnr
                                inner join eket as e on eebeln = aebeln
                                               and   eebelp = bebelp
                                where c~beskz = 'E'
                                and   c~werks = '1000'
                                and   d~mtart = 'FERT'
                                and   b~loekz = space
                                and   b~elikz = space
                                and   e~eindt in r_eindt.
    if sy-subrc ne 0.
    message e000(zwave) with 'No open purchase order found'.
    endif.
    ENDFORM.                    " get_data_tables
    *&      Form  display_data
          text
    FORM display_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_INTERFACE_CHECK                 = ' '
       I_BYPASSING_BUFFER                =
       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = v_repid
       I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = g_user_command
       I_CALLBACK_TOP_OF_PAGE            = ' '
       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
       I_CALLBACK_HTML_END_OF_LIST       = ' '
       I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =
       I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gr_layout_bck
          IT_FIELDCAT                       = gt_fieldcat[]
       IT_EXCLUDING                      =
       IT_SPECIAL_GROUPS                 =
       IT_SORT                           =
       IT_FILTER                         =
       IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
        I_SAVE                            = g_save
        IS_VARIANT                        =
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
       IS_PRINT                          =
       IS_REPREP_ID                      =
       I_SCREEN_START_COLUMN             = 0
       I_SCREEN_START_LINE               = 0
       I_SCREEN_END_COLUMN               = 0
       I_SCREEN_END_LINE                 = 0
       IT_ALV_GRAPHICS                   =
       IT_ADD_FIELDCAT                   =
       IT_HYPERLINK                      =
       I_HTML_HEIGHT_TOP                 =
       I_HTML_HEIGHT_END                 =
       IT_EXCEPT_QINFO                   =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER           =
       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_output
       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.                    " display_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Purchase order number
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'EBELN'.
      LS_FIELDCAT-ref_fieldname = 'EBELN'.
      LS_FIELDCAT-ref_tabname = 'EKKO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Purchase Order'.
      ls_fieldcat-seltext_M = 'Purchase Order'.
      ls_fieldcat-seltext_S = 'Purchase Order'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-ref_fieldname = 'MATNR'.
      LS_FIELDCAT-ref_tabname = 'EKPO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Material'.
      ls_fieldcat-seltext_M = 'Material'.
      ls_fieldcat-seltext_S = 'Material'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init

  • How to write code for this logic, plz help me very urgent

    Hi All,
    i am new to sap-abap, i got this work and i m working on this can any body help me in writing code, plz help me, this is very very urgent.
    here  i m giving my logic, can anybody send me the code related to this logic.
    this is very urgent .
    this program o/p should be in ALV format and need to create one commond 'SAVE" on this o/t list  if  user clicks save processedon and processedby fields in ZFIBUE should be updated automatically.
    i am creating one custom table zfibue having fields: (serialno, bukrs, matnr,prdha,hkont,gsber,wrbtr,budat, credate, cretime,processed, processedon, processedby,mapped)
    fields of zfibue:
    serailno = numc
    bukrs = char
    matnr = char
    prdha = char
    hkont = char
    gsber = char
    wrbtr = char
    budat = date
    credate = date
    cretime = time
    processed= char
    processedon = date
    processedby = char
    mapped = char      are   belongs to above type data types
    and seelct-optionfields:  s_bukrs for bseg-bukrs
                                        s_hkont for bseg-hkont,
                                         s_budat for bkpf-budat,
                                         s_processed for zfibue-processed,
                                          s_processedon for zfibue-processedon,
                                          s_mapped. for zfibue-mapped
    parameters: p_chk1 as checkbox,
                      p_chk2 as checkbox.
                      p_filepath type rlgrap-filename.
    1.1 Validate the user inputs (S_BUKRS and S_HKONT) against respective check tables (T001 and SKB1). If the validation fails, provide respective error message. Eg: “Invalid input for Company Code”.
    1.2 Fetch SERIALNO, BUKRS, MATNR, PRDHA, HKONT, GSBER, WRBTR, BUDAT, CREDATE, CRETIME, PROCESSED, PROCESSEDON, PROCESSEDBY, MAPPED from table ZFIBUE into internal table GT_ZFIBUE where BUKRS IN S_BUKRS, HKONT IN S_HKONT, BUDAT IN S_BUDAT, PROCESSED IN S_PROCESSED, PROCESSEDON IN S_PROCESSEDON, and MAPPED IN S_MAPPED.
    1.3 If P_CHK2 = ‘X’, go to step 1.11. Else continue.
    1.4 If P_CHK1 = ‘X’, continue. Else go to step 1.9
    1.5 Fetch MATNR, PRDHA from MARA into GT_MARA for all entries in GT_ZFIBUE where MATNR = GT_ZFIBUE-MATNR.
    1.6 Sort and delete adjacent duplicates from GT_MARA based on MATNR.
    1.7 Loop through GT_ZFIBUE where PRDHA = blank.
              Read Table GT_MARA based on MATNR = GT_ZFIBUE-MATNR.
              IF sy-subrc = 0.
                     Move GT_MARA-PRDHA to GT_ZFIBUE-PRDHA.
                  Modify Table GT_ZFIBUE. “Update Product Hierarchy
                 Endif.
        Fetch PRDHA, GSBER from ZFIBU into GT_ZFIBU for all entries in GT_ZFIBUE where PRDHA = GT_ZFIBUE-PRDHA.
        Read Table GT_ZFIBU based on PRDHA = GT_ZFIBUE-PRDHA.
              IF sy-subrc = 0.
                     Move GT_ZFIBU-GSBER to GT_ZFIBUE-GSBER.
                  Move “X” to GT_ZFIBUE-MAPPED.      
                  Modify Table GT_ZFIBUE.
                 Endif.   
    Endloop.
    1.8 Modify database table ZFIBUE from GT_ZFIBUE.
    1.9 Fill the field catalog table GT_FIELDCAT using the details of output fields listed in section “Inputs/Outputs” (above).
       Eg:                 LWA_ FIELDCAT -SELTEXT_L = 'Serial Number’.
                              LWA_ FIELDCAT -DATATYPE = ‘NUMC’.
                              LWA_ FIELDCAT -OUTPUTLEN = 9.
                              LWA_ FIELDCAT -TABNAME = 'GT_ZFIBUE'.
                              LWA_ FIELDCAT-FIELDNAME = 'SERIALNO'.
              Append LWA_FIELDCAT to GT_FIELDCAT
    Note: a) The output field GT_ZFIBUE-PROCESSED will be editable marking INPUT = “X” in field catalog (GT_FIELDCAT).
             b) The standard ALV functionality will be used to give the user option for selecting all or blocks of entries at a time.
             c) The PF-STATUS STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN will be copied to the program and modified to include a “SAVE” button.
    1.10 Call the function module REUSE_ALV_GRID_DISPLAY passing output table GT_ZFIBUE and field catalog GT_FIELDCAT. Additional parameters like I_CALLBACK_PF_STATUS_SET (= ‘ZFIBUESTAT’) and I_CALLBACK_USER_COMMAND (=’HANDLE_USER_ACTION’) will also be passed to handle user events. Go to 2.14.
    1.11 Download the file to P_FILEPATH using function module GUI_DOWNLOAD passing GT_ZFIBUE.
    1.12 Exit Program.
    Logic to be implemented in  routine “Handle_User_Action”
    This routine will have the following interface:
    FORM Handle_User_Action  USING r_ucomm LIKE sy-ucomm
                                                               rs_selfield TYPE slis_selfield.
    ENDFORM.
    Following logic will be implemented in this routine:
    1.     If r_ucomm = ‘SAVE’, continue. Else exit.
    2.     Loop through GT_ZFIBUE where SEL_ROW = ‘X’. “Row is selected
    a.     IF GT_ZFIBUE-PROCESSED = ‘X’.
    i.     GT_ZFIBUE-PROCESSEDON = SY-DATUM.
    ii.     GT_ZFIBUE-PROCESSEDBY = SY-UNAME.
    iii.     MODIFY ZFIBUE FROM work area GT_ZFIBUE.
    Endif.
    Endloop.

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • 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

  • Duplicate records found while loading master data(very urgent)

    Hi all,
    One infopackage in the process chain failed while laoding the master data(full update).Its showing the following error-->duplicate record found ..1 record used in /BI0/PTCTQUERY and the same record occured in /BI0/PTCTQUERY tables.
    can anyone give me the solution...its very urgent...
    Thanks & Regards,
    Manjula

    Hi
    You can see the check box in the Processing tab page. Make a tick mark for the check box Ignore Duplicate Data Records indicator . When multiple data records that have the same key are transferred, the last data record in the request is updated to BI. Any other data records in the request with the same key are ignored.
    Help says that:
    To maintain consistency, ignoring duplicate data records is only possible if the data is updated serially. A serial update is when data is first updated into the PSA then, after it has been successfully written to the PSA, it is updated into the master data or text tables of the InfoObject.
    If a DataSource transfers potentially duplicate data records or if you manually set the Ignore Duplicate Data Records indicator, the PSA Only update type is automatically selected in the scheduler.
    hope it clears ur doubt, otherwise let me know.
    Regards
    Kiran

  • Please help me with the following two questions, very urgent

    Hi All,
    Please help me with some scenerios about what are the common problems when modifying a standard script such a standard Invoice script and how can we overcome them.
    What are the common problems encountered when working with SAP SMARTFORMS and how to overcome them?
    Please help me with these questions, its very urgent.
    Thanks in advance.
    MD.

    hi
    hope it will help you.
    reward if ehlp.
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Smartform
    you can check this link here you can see the steps and you can do it the same by looking at it..
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SMARTFORMS STEPS.
    1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
    2. Create Table type(t_struct) of stracture in se11.
    3. In your program declare Internal table(Itab) type table of structure(struct).
    4. Define work area(wa) like line of internal table.
    5. Open Tcode Smartforms
    6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
    7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
    8. In form pages and window, create Page node by default Page1 is available.
    9. In page node you can create numbers of secondary window. But in form there is only one Main window.
    10. By right click on page you can create windows or Go to Edit, Node, Create.
    11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
    12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
    13. In table there are three areas Header, Main Area, Footer.
    14. Right click on the Main area create table line by default line type1 is there select it.
    15. Divide line into cells according to your need then for each cell create Text node.
    16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
    17. Save form and activate it.
    18. Then go to Environment, function module name, there you get the name of function module copy it.
    19. In your program call the function module that you have copied from your form.
    20. In your program in exporting parameter of function pass the internal table(itab).
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE&
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME&
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE&
    Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
    &SFSY-JOBPAGES&
    Contains the total page number of all forms in the currently processed print request.
    &SFSY-WINDOWNAME&
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME&
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK&
    Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
    &SFSY-MAINEND&
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
    Advantages of SAP Smart Forms
    SAP Smart Forms have the following advantages:
    1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
    2. Displaying table structures (dynamic framing of texts)
    3. Output of background graphics, for form design in particular the use of templates which were scanned.
    4. Colored output of texts
    5. User-friendly and integrated Form Painter for the graphical design of forms
    6. Graphical Table Painter for drawing tables
    7. Reusing Font and paragraph formats in forms (Smart Styles)
    8. Data interface in XML format (XML for Smart Forms, in short XSF)
    9. Form translation is supported by standard translation tools
    10. Flexible reuse of text modules
    11. HTML output of forms (Basis release 6.10)
    12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)

  • Vendor Line Item Upolad Without TDS Portion  -- very urgent

    Hi Peers
    I want to upload the vendor Line Items. If my Vendor is a TDS Vendor then , the system is calculating TDS even for Initial Upload. Is there anyway by which i can bypass this. Plz help. Its very urgent.
    Regards
    Rajaram

    Dear Rajaram,
    Do not upload vendor open balances with TDS master updated. System is calculating TDS coz u have first updated TDS master in vendor master with liable tick on it.
    The process should be as:
    1. First upload vendor open items thru program
    2. Then upload TDS master with liable tick .
    Doing this system will start calculating TDS on future invoices. Now go to T code MASS, select Vendors under it , & deactivate liable from each master record.And then upload the balance.
    Regards,
    Ajay Gupte

Maybe you are looking for