ADF BC declarative Compare  validator on date attributes

Hello
I trying to abandone validation on the UI beans by resorting to the built-in ADF declarative validation available at the Entity object level.
I test the Compare validator between two numeric attributes and it worked well, also between two String attributes, but when i tried to compare two dates attributes the results of the validation was not correct.
any reason as to why Entity based validation based on dates values does not give appropriate results
rgds
Ammar Sajdi

We are using entity based declerative validations for Dates with no problem.
Remember that Date type has also a time portion in database.
may be there is your error.

Similar Messages

  • Bug:  ADF BC Entity Object entity level validator on dates

    Hi JDev team
    I'm having an issue getting the ADF BC EO entity level compare validator to work on Date columns in JDev 11g TP and suspect a bug.
    Steps to reproduce:
    1.     Create EO based on table with 2 Date attributes, eg. StartDate and EndDate both domain Date.
    2.     In the EO editor, under General tab, select create button for Validation Rules.
    3.     In Validation Rule dialog.......
    4.     Select Compare Validator
    5.     Select StartDate as attribute
    6.     Select LessOrEqualTo as operator
    7.     Select Entity Attribute as compare with
    8.     Select EndDate in Select Entity Attribute list
    9.     Change to Validation Execution tab
    10.     StartDate should already by in Selected Attributes list
    11.     Also move EndDate to Selected Attributes list
    12.     Change to Failure Handling tab
    13.     Ensure Error is selected for Validation Failure Severity
    14.     Enter an error message in the Message Text field
    15.     Select ok button.
    Within Business Components Browser for an existing record, setting the StartDate >= EndDate then commit does not raise an error. I'm guessing we should see an error.
    I've attempted the same with 2 Number domain attributes and the error is correctly raised, so I suspect the error is with the Data domains.
    Regards,
    CM.

    Can no longer reproduce this bug in the JDEVADF_MAIN_GENERIC_070607.0749.4562 build I have on my machine today, so it has been fixed post-JavaOne tech preview.

  • Java.lang.NoSuchMethodError on my adf:inputrender tag for Date attribute

    Hello!
    Please help. I don't know how to fix this error:
    java.lang.NoSuchMethodError: oracle.adf.model.binding.DCUtil.findSpelObject(Ljava/lang/Object;Ljava/lang/String;Z)Ljava/lang/Object;     
    at oracle.jbo.html.jsp.datatags.DataTagBase.initializeUsingModelReference(DataTagBase.java:112)     
    at oracle.jbo.html.jsp.datatags.DataTagBase.initializeDataSource(DataTagBase.java:144)     
    at oracle.jbo.html.jsp.datatags.DataTagBase.internalInitialize(DataTagBase.java:274)     
    at oracle.jbo.html.jsp.datatags.InputTagBase.internalInitialize(InputTagBase.java:164)     
    at oracle.jbo.html.jsp.datatags.InputRenderTag.internalInitialize(InputRenderTag.java:77)     
    at oracle.jbo.html.jsp.datatags.InputTagBase.doStartTag(InputTagBase.java:235)
    I am using Jdev 10.1.2 and this error points to my adf:inputrender tag. I am rendering a Date attribute from my viewobject. Also this error only shows up in my deployed jsp (deployed to OAS 10.1.2). If I just run the web app in JDev 10.1.2 (using Standalone OC4J), there is no error.
    Please help!

    Hello,
    Anyone, please help me on this... by the way, I run my program without errors in JDev's OC4J, not the standalone OC4J. But when I deploy it to my server's OAS, it gets the error above whenever I load a jsp with an adf:inputrender on a Date attribute of my VO.

  • Using operator on Date attribute on ADF Searh Form ?

    Hi All,
    On our ADF Search Form, there is Date attribute. We have requirement that user can type :
    '15-01-2007'or
    BETWEEN '15-01-2007' AND '15-02-2007'
    How can we achieve that ?
    Thank you for your help,
    xtanto

    Did you try typing in exactly what you've posted here?
    That should work out of the box in the ADF BC Tester.
    It won't work in an ADF Faces application using Find Mode, however. See release notes http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/readme.html#dbind4

  • Master data attributes declaration in update rules

    Hi Everyone,
    can any one tell me, How do we use attributes of master data in update rules..need syntax for using attributes of customer.... like comm_structure-/bic/......etc
    post code is attribute of customer, How do I use it in update rule
    thanks
    Siri

    Hi!
    if you have customer as attribute in your Infosource and Postcode as acharecteristic in your data target then you just need to select ther 3rd type of update rule "MAster data attribute of" and specifxy 0Cusotomer beside
    with regards
    ashwin

  • ADF custom binding for given service data model

    hi
    I have this business service that has a given data model. I would like to bind ADF Faces components to this data model.
    two examples:
    (1) The data model has a date attribute somewhere that holds the date of when something has been "checked"/"approved". The user interface should present this information as a regular checkbox.
    (2) The data model has some attribute as "multilingual text". It is like a regular text attribute, but the text (data) has been translated. The user interface should present this information as a regular text input field, but depending on some "selected"/"current" language.
    I looked at this example from Steve Muench about custom binding:
    http://otn.oracle.com/products/jdev/tips/muench/custombinding/CustomAttrBindingClass.zip
    I have found some "solution" to implement the kinds of custom binding I need:
    http://verveja.footsteps.be/~verveja/files/oracle/CustomBindingStuff-v0.08.zip
    (Check the README.txt file.)
    I extend JUCtrlAttrsDef and JUCtrlAttrsBinding, introduce a ConversionProxyRule interface and added meta-data to the <x>PageDef.xml files.
    JDeveloper shows warnings like these in the "Compiler - Log", but it all seems to work fine:
    Warning(55,62): <Line 55, Column 62>: XML-24534: (Error) Element 'NamedData' not expected.- questions:
    (1) Do I really need all this, have I missed some typical approach for this?
    (2) How do I now that "extending" the binding this way, doesn't break in the next JDeveloper release?
    (3) What alternatives are there to approach this kind of "binding requirements"?
    many thanks
    Jan Vervecken

    (1) Is the simplest overall and the solution I myself would do, but given your comments....
    (2) This would be the second easiest, but would involve some delegation, sure.
    (3) Involves creating custom binding objects, which while possible, we don't have much documentation on that
    JDeveloper shows warnings like these in the "Compiler - Log", but it all seems to work fine: Warning(55,62): <Line 55, Column 62>: XML-24534: (Error) Element 'NamedData' not expected.
    This is an XMLSchema validation failure since the schema for the <attributeValues> element in that namespace does not allow <NamedData> children, only the <action> element does. You can extract all the schemas from the adfdt_common.jar file in the ./adfdt/lib directory to have a closer look at that.
    - questions:
    (1) Do I really need all this, have I missed some typical approach for this?
    I mentioned a straightforward approach that in my opinion doesn't qualify as radically altering your data model, but I respect your opinion to see that differently of course. :-)
    The approach I mentioned would be the typical approach for this case.
    (2) How do I now that "extending" the binding this way, doesn't break in the next JDeveloper release?
    There is no 100% guarantee other than the fact that we try our best not to perform breaking changes since keeping upward compatibility is something we've tried to do since the beginning.
    (3) What alternatives are there to approach this kind of "binding requirements"?
    We've discussed the three alternatives above that I can think of. This doesn't preclude others, but those are the first three we both thought of... I hope others chime in with some insights based on there experiences, too.

  • BC4J : Validation Rule - Using Compare Validator

    Hi,
    I am not able to use Compare Validator with "Compare With" as "View Object Attribute"
    When I select "VO Attribute", I just see components in the "Select Attribute" Text Area...Cannot see the attributes.
    I have lots of VO's in my project.How do I go about it?
    Thanks,
    Sandeep
    How dio
    null

    Hi,
    if you validate against a query, why don't you use a LOV for users to choose from this list ?
    Here's a doc that explains how to filter LOVs https://blogs.oracle.com/jdevotnharvest/entry/how_to_dynamically_filter_model If you hide the LOV query panel (which you can do declaratively) then users wont be able to override your query filter.
    Frank

  • Restriction of Validity start date in Scheduling agreement

    Hi,
    I am not able to convert the message 06 170( Start of validity period is in the past) in error message , when i am going to define attributes of system messages in purchasing and converting this message into error , system still does not give error message when i am selecting  back  validity start date in the header of Scheduling agreement (me32l)
    What can be the possible reason.
    Regards
    Sachin

    Hi,
    I believe the message 06-170 is hard-coded in Include "MM06EFRP_EKKO-KDATE" in the Program SAPMM06E
    Laufzeitbeginn in der Vergangenheit -
        IF ekko-kdatb < sy-datlo.
          MESSAGE w170 INTO gl_dummy.
          mmpur_message 'W' '06' '170' '' '' '' ''.
    Please consul your ABAP Team on this to change it to Error.
    But SAP does not recommend changing standard Programs, so please discuss this and see that its really required and will not have any effects to your business process, because there may be instances wherein you might require to create scheduling agreements with a past validity date sometime in future based on business requirement.
    Regards
    Chandra Shekhar

  • Error while loading to Master data attribute 0product

    Hi experts,
    While loading the data from 0material to 0product master data attribute i am getting a error ' 0MATERIAL : Data record 2421 (''300000072 '):Version '300000072 ' is not valid. I request u all to help me to solve this error.
    Diagnosis
        Data record 2421 & with the key '300000072 &' is invalid in value
        '300000072 &' of the attribute/characteristic 0MATERIAL &.
    System Response
        The system has recognized that the value mentioned above is invalid, and
        has processed this general error message. A subsequent message may give
        you more information on the error. This message refers to the same
        value, even though it does not state this explicitly.
    Procedure
        If this message appears during a data load, maintain the attribute in
        the PSA maintenance screens. If this message appears in the master data
        maintenance screens, leave the transaction and call it again. This
        allows you to maintain your master data.
    Please let me know what could be the problem....
    Regards,
    Prashanth
    Edited by: Prashanth Shetty on Jul 16, 2008 7:42 AM

    Hi,
       The issue is due to errorneous record.
    Delete the request in Master data and Try the following.
    1) Goto PSA --> filter the Status (Red or Green)
    Select the Red records and correct the data in which error is throwm.
    After correcting the data, save and Right click PSA and give Start update immediately.
    2) Load via Infopackage only to PSA and later update from PSA and check.
    Any one of the above 2 methods will solve the issue.
    Regards,
    Balaji V

  • Preventing ADF Input Form from validating

    Can anyone say how can i prevent an ADF Creation Form from validating the inputText fields when there is no data entered in any of the fields and the user press a Cancel button to cancel the input and return/navigate to another page???
    Currently when i try that that the fields are validates and a message is displayed saying the field requires a value. And it will not allow me to navigate to another page unless some value is entered. Why is this so ?
    Thanks

    I figured this out myself, actually this was quite simple.- just set the 'immediate' property on the component (button) to 'true'.

  • Map My Update Rule from a Master Data Attribute

    Hello experts,
    I haven't tried this scenario yet, hope you can help me, the Issue is this
    I have 2 InfoObjects ZPSCHRCHY and 0PROFIT_CTR from InfoCube WBS cost and allocations I want both the InfoObjects to be mapped to 0PROFIT_CTR attribute of 0WBS_ELEMT master data object, I have tried the Master Data Attribute but only 0PROFIT_CTR is an attribute of the Master Data.how can I mapped ZPSCHRCHY and 0PROFIT_CTR to 0PROFIT_CTR?, Is creating a start routine for it must be used? Thank you very much
    Regards and Thanks
    Chris

    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TYPES:
    BEGIN OF r_MD_WBS_ELEMENT,
       WBS_ELEMT  like /BI0/PWBS_ELEMT-WBS_ELEMT,
       OBJVERS    like /BI0/PWBS_ELEMT-OBJVERS,
       PROFIT_CTR like /BI0/PWBS_ELEMT-PROFIT_CTR,
    END of r_MD_WBS_ELEMENT.
    DATA: t_MD_WBS_ELEMENT  TYPE STANDARD TABLE OF r_MD_WBS_ELEMENT,
           wa_MD_WBS_ELEMENT TYPE r_MD_WBS_ELEMENT.
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS8ZPSG030.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
      REFRESH: t_MD_WBS_ELEMENT.
          SELECT WBS_ELEMT
                 OBJVERS
                 PROFIT_CTR
          INTO TABLE t_MD_WBS_ELEMENT
          FROM /BI0/PWBS_ELEMT
       FOR ALL ENTRIES IN DATA_PACKAGE
         WHERE WBS_ELEMT   = DATA_PACKAGE-WBS_ELEMT.
        IF sy-subrc EQ 0.
        Do nothing
        ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

  • Declaring and accessing custom global attributes of component controller

    Hi,
    I want to declare some global attributes for Component Controller and initialize them in WdDoInit() method.
    I have declared them under Component Controller --> Attributes tab --> after wd_context and wd_this (say G_MESSAGE).
    However,  when I am trying to set them in wdDoInit() method, I get compilation error saying G_MYMESSAGE is unknown and its not defined using data statement.
    How do I access these attributes?
    Thanks and regards,
    Amey

    Hello Amey,
    You need to access the variable by "wd_this->g_mymessage"
    Since wd_this attribute in each controller refers to interface of local controller. you could read the description of that attribute in attribute tab.
    Regards
    Anurag Chopra

  • Validation on Date

    Dear All,
    i want to apply validation on date item.
    i have created some cases if any case would be fail then error shold be fire.
    How can i do this.
    my code
    DECLARE
    F DATE;
    T DATE;
    BEGIN
    SELECT TO_DATE(F_DATE),TO_DATE(T_DATE) INTO F,T FROM VENDOR_CONTRACT_MAS WHERE CONTRACT_ID=:P5_CONTRACT_ID
    AND VENDOR_ID =:P5_SERVICE_ID
    AND SBU_CODE=:P0_SBU_CODE;
    if F < TO_DATE(:P5_F_DATE) then
      RETURN TRUE;
      end if;
      if F > TO_DATE(:P5_T_DATE) then
         RETURN TRUE;
      end if;
      if T > TO_DATE(:P5_T_DATE) then
         RETURN TRUE;
      end if;
      if T < TO_DATE(:P5_F_DATE) then
        RETURN TRUE;
      end if;
      if F > TO_DATE(:P5_T_DATE) then
        RETURN TRUE;
      end if;
    end;i want to apply validation if any case is fail.
    how can i do this.
    Thanks
    Edited by: Vedant on Dec 12, 2012 3:04 AM

    Not sure if I understand your question correctly. You can write validation against the date item the same way like any other page item:
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldr_validate.htm
    In your case, you can choose the validation type to be PL/SQL "Function Returning Boolean".
    You can include else statement to return false when the validation fails like:
    if F < TO_DATE(:P5_F_DATE) then
      RETURN TRUE;
    else
      return false;
    end if;

  • Data validation for Date Field in Web Dynpro ABAP

    Hi ,
    In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.)
    If u ll enter the wrong date it should validate the Date and throw an error message.
    Please Reply soon its urgent.
    Thanks,
    Deepika

    Hi,
    First read the two attributes start date and end date.
    Then write the following condition.
    IF item_start_date > item_end_date.
    Error message.
    Endif.
    For pop up error message you need to use Create_window method of the Interface if_wd_window.
    Thanks.

  • Valid To Date not available in BAPI_MATERIAL_BOM_GROUP_CREATE

    HI All-
    I am creating a BOM using the BAPI - BAPI_MATERIAL_BOM_GROUP_CREATE. My requirement is to create BOM components with Valid From and Valid TO dates. This BAPI has Valid From Date field whereas no field available to enter Valid-To Date. The BAPI gets created with components but the Valid To date is defaulted to 12/31/9999. I dont want this. I have my own Valid TO dates in the file and I want those to appear. How to go about it?
    Thanks
    Shakir.
    Edited by: Shakir on Jul 30, 2008 11:36 AM

    hi,
    i too faced the problem ...then i went for bdc.....here is the code
    *& Report ZPP_REPORT_BOM
    *& Created By : shailaja
    *& Created on : 09.02.2007
    *& Requested By :
    *& Description : Master Data Upload BOM
    REPORT ZPP_REPORT_BOM NO STANDARD PAGE HEADING LINE-SIZE 255.
    Structure Declaration
    TYPES : BEGIN OF TY_SOURCE,
    MATNR(18),
    WERKS(4),
    STLAN(1),
    STLAL(2),
    DATUV(10),
    POSNR(4), " BOM item number
    POSTP(1), " BOM Item category
    IDNRK(18),
    MENGE(13),
    MEINS(3),
    AVOAU(3), " Operation Scrap
    NETAU, " Indicator: Net scrap
    ALPGR(2),
    ALPRF(2),
    ALPST(1),
    EWAHR(3),
    LGORT(4), " Storage Location
    BMENG(13),
    STLST(2),
    END OF TY_SOURCE,
    BEGIN OF TY_HEADER ,
    MATNR(18),
    WERKS(4),
    STLAN(1),
    STLAL(2),
    DATUV(10),
    BMENG(13),
    LOSVN(2),
    LOSBS(2),
    STLST(2),
    END OF TY_HEADER,
    BEGIN OF TY_ITEM ,
    MATNR(18),
    POSNR(4),
    POSTP(1),
    IDNRK(18),
    MENGE(13),
    MEINS(3),
    AUSCH(5),
    AVOAU(3),
    NETAU,
    ALPGR(2),
    ALPRF(2),
    ALPST(1),
    EWAHR(3),
    LGORT(4),
    END OF TY_ITEM.
    Internal Table Declaration
    DATA : T_SOURCE TYPE STANDARD TABLE OF TY_SOURCE INITIAL SIZE 1,
    T_HEADER TYPE STANDARD TABLE OF TY_HEADER INITIAL SIZE 1,
    T_ITEM TYPE STANDARD TABLE OF TY_ITEM INITIAL SIZE 1,
    T_TARGET TYPE STANDARD TABLE OF BDCDATA INITIAL SIZE 1.
    DATA : W_SOURCE TYPE TY_SOURCE,
    W_SOURCE1 TYPE TY_SOURCE,
    W_HEADER TYPE TY_HEADER,
    W_ITEM TYPE TY_ITEM,
    W_TARGET TYPE BDCDATA,
    COUNT TYPE I.
    Variable Declaration
    DATA: W_FNAME TYPE STRING,
    FNAM(20),
    I(2) TYPE N,
    V_COUNT TYPE I,
    V_GROUP TYPE APQI-GROUPID.
    SELECTION SCREEN CRITERIA
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_PATH TYPE RLGRAP-FILENAME,
    P_GROUP(15) DEFAULT 'BOM'.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PATH.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = 'C:\TEST.TXT'
    DEF_PATH = 'C:\Documents and Settings\Naidu\Desktop\TEST-1.txt'
    MASK = ',.,..'
    MODE = 'O' "O --> Open S --> Save
    TITLE = 'OPEN'
    IMPORTING
    FILENAME = P_PATH
    RC =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 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.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM SUB_UPLOAD.
    PERFORM SUB_BDC_PROCESS.
    PERFORM SUB_CLOSE.
    WRITE:/ 'The session', V_GROUP ,'has been successfully created with',
    V_COUNT.
    WRITE:/ 'Please process the session in SM35'.
    *& PERFORM SUB_UPLOAD
    FORM SUB_UPLOAD.
    W_FNAME = P_PATH.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = W_FNAME
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    TABLES
    DATA_TAB = T_SOURCE
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT T_SOURCE INTO W_SOURCE.
    W_SOURCE1 = W_SOURCE.
    AT NEW MATNR.
    W_HEADER-MATNR = W_SOURCE1-MATNR.
    W_HEADER-WERKS = W_SOURCE1-WERKS.
    W_HEADER-STLAN = W_SOURCE1-STLAN.
    W_HEADER-DATUV = W_SOURCE1-DATUV.
    W_HEADER-BMENG = W_SOURCE1-BMENG.
    W_HEADER-STLAL = W_SOURCE1-STLAL.
    W_HEADER-STLST = W_SOURCE1-STLST.
    APPEND W_HEADER TO T_HEADER.
    ENDAT.
    W_ITEM-MATNR = W_SOURCE1-MATNR.
    W_ITEM-IDNRK = W_SOURCE1-IDNRK.
    W_ITEM-MENGE = W_SOURCE1-MENGE.
    W_ITEM-MEINS = W_SOURCE1-MEINS.
    W_ITEM-POSTP = W_SOURCE1-POSTP.
    W_ITEM-POSNR = W_SOURCE1-POSNR.
    W_ITEM-AVOAU = W_SOURCE1-AVOAU.
    W_ITEM-LGORT = W_SOURCE1-LGORT.
    W_ITEM-NETAU = W_SOURCE1-NETAU.
    W_ITEM-ALPGR = W_SOURCE1-ALPGR.
    W_ITEM-ALPRF = W_SOURCE1-ALPRF.
    W_ITEM-ALPST = W_SOURCE1-ALPST.
    W_ITEM-EWAHR = W_SOURCE1-EWAHR.
    APPEND W_ITEM TO T_ITEM.
    CLEAR :W_ITEM,W_HEADER.
    ENDLOOP.
    ENDFORM. "Sub_upload
    *& PERFORM SUB_BDC_PROCESS
    FORM SUB_BDC_PROCESS.
    V_GROUP = P_GROUP.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    DEST = FILLER8
    GROUP = V_GROUP "'BOM'
    HOLDDATE = FILLER8
    KEEP = 'X'
    USER = SY-UNAME
    RECORD = FILLER1
    PROG = SY-CPROG
    IMPORTING
    QID =
    EXCEPTIONS
    CLIENT_INVALID = 1
    DESTINATION_INVALID = 2
    GROUP_INVALID = 3
    GROUP_IS_LOCKED = 4
    HOLDDATE_INVALID = 5
    INTERNAL_ERROR = 6
    QUEUE_ERROR = 7
    RUNNING = 8
    SYSTEM_LOCK_ERROR = 9
    USER_INVALID = 10
    OTHERS = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT T_HEADER INTO W_HEADER.
    REFRESH T_TARGET.
    perform bdc_dynpro using 'SAPLCSDI' '0100'.
    perform bdc_field using 'BDC_CURSOR' 'RC29N-DATUV'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    perform bdc_field using 'RC29N-MATNR' W_HEADER-MATNR."'FZGN25051641'.
    perform bdc_field using 'RC29N-WERKS' W_HEADER-WERKS."'2200'.
    perform bdc_field using 'RC29N-STLAN' W_HEADER-STLAN."'1'.
    PERFORM BDC_FIELD USING 'RC29N-STLAL' W_HEADER-STLAL.
    perform bdc_field using 'RC29N-DATUV' W_HEADER-DATUV."'31122005'.
    perform bdc_dynpro using 'SAPLCSDI' '0110'.
    perform bdc_field using 'BDC_CURSOR' 'RC29K-BMENG'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    perform bdc_field using 'RC29K-BMENG' W_HEADER-BMENG."'1668'.
    PERFORM BDC_FIELD USING 'RC29K-STLST' W_HEADER-STLST."'1'.
    perform bdc_dynpro using 'SAPLCSDI' '0111'.
    perform bdc_field using 'BDC_CURSOR' 'RC29K-LABOR'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    I = 1.
    LOOP AT T_ITEM INTO W_ITEM WHERE MATNR = W_HEADER-MATNR.
    COUNT = COUNT + 1.
    IF COUNT GT 14.
    CLEAR I.
    I = 2.
    BREAK KISHORES.
    perform bdc_dynpro using 'SAPLCSDI' '0140'.
    perform bdc_field using 'BDC_OKCODE' '=FCNP'.
    ENDIF.
    perform bdc_dynpro using 'SAPLCSDI' '0140'.
    perform bdc_field using 'BDC_CURSOR' 'RC29P-SORTF(01)'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    CONCATENATE 'RC29P-IDNRK(' I ')' INTO FNAM.
    perform bdc_field using FNAM W_ITEM-IDNRK.
    CONCATENATE 'RC29P-MENGE(' I ')' INTO FNAM.
    perform bdc_field using FNAM W_ITEM-MENGE.
    CONCATENATE 'RC29P-MEINS(' I ')' INTO FNAM.
    perform bdc_field using FNAM W_ITEM-MEINS.
    CONCATENATE 'RC29P-POSTP(' I ')' INTO FNAM.
    perform bdc_field using FNAM W_ITEM-POSTP.
    CONCATENATE 'RC29P-POSNR(' I ')' INTO FNAM.
    PERFORM BDC_FIELD USING FNAM W_ITEM-POSNR.
    perform bdc_dynpro using 'SAPLCSDI' '0130'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    perform bdc_field using 'BDC_CURSOR' 'RC29P-ALPGR'.
    PERFORM BDC_FIELD USING 'RC29P-NETAU' W_ITEM-NETAU.
    PERFORM BDC_FIELD USING 'RC29P-AVOAU' W_ITEM-AVOAU.
    perform bdc_field using 'RC29P-ALPGR' W_ITEM-ALPGR.
    IF W_ITEM-ALPGR = ' '.
    ELSE.
    perform bdc_dynpro using 'SAPLCSDI' '0716'.
    perform bdc_field using 'BDC_CURSOR' 'RC29P-EWAHR'.
    perform bdc_field using 'BDC_OKCODE' '=CLWI'.
    perform bdc_field using 'RC29P-ALPRF' W_ITEM-ALPRF.
    perform bdc_field using 'RC29P-ALPST' W_ITEM-ALPST.
    perform bdc_field using 'RC29P-EWAHR' W_ITEM-EWAHR.
    ENDIF.
    perform bdc_dynpro using 'SAPLCSDI' '0131'.
    perform bdc_field using 'BDC_OKCODE' '/00'.
    perform bdc_field using 'BDC_CURSOR' 'RC29P-POTX1'.
    perform bdc_field using 'RC29P-SANKA' 'X'.
    PERFORM BDC_FIELD USING 'RC29P-LGORT' W_ITEM-LGORT.
    I = I + 1.
    CLEAR W_ITEM.
    ENDLOOP.
    perform bdc_dynpro using 'SAPLCSDI' '0140'.
    perform bdc_field using 'BDC_CURSOR' 'RC29P-POSNR(01)'.
    perform bdc_field using 'BDC_OKCODE' '=FCBU'.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = 'CS01'
    POST_LOCAL = NOVBLOCAL
    PRINTING = NOPRINT
    SIMUBATCH = ' '
    CTUPARAMS = ' '
    TABLES
    DYNPROTAB = T_TARGET
    EXCEPTIONS
    INTERNAL_ERROR = 1
    NOT_OPEN = 2
    QUEUE_ERROR = 3
    TCODE_INVALID = 4
    PRINTING_INVALID = 5
    POSTING_INVALID = 6
    OTHERS = 7
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    V_COUNT = V_COUNT + 1.
    ENDIF.
    CLEAR : W_ITEM,W_HEADER.
    ENDLOOP.
    ENDFORM. "SUB_BDC_PROCESS
    *& Form SUB_CLOSE
    text
    --> p1 text
    <-- p2 text
    FORM SUB_CLOSE .
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    NOT_OPEN = 1
    QUEUE_ERROR = 2
    OTHERS = 3.
    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. " SUB_CLOSE
    Start new screen *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    CLEAR W_TARGET.
    W_TARGET-PROGRAM = PROGRAM.
    W_TARGET-DYNPRO = DYNPRO.
    W_TARGET-DYNBEGIN = 'X'.
    APPEND W_TARGET TO T_TARGET.
    ENDFORM. "BDC_DYNPRO
    Insert field *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> SPACE.
    CLEAR W_TARGET.
    W_TARGET-FNAM = FNAM.
    W_TARGET-FVAL = FVAL.
    APPEND W_TARGET TO T_TARGET.
    ENDIF.
    ENDFORM. "BDC_FIELD

Maybe you are looking for

  • SendEventToEventTarget fails in Acrobat 8 on Mac

    I have a plug-in which I'm porting from Acrobat 7 to 8 on Mac. I'm using PowerPlant to create a modal dialog which has a text control that captures standard editing keyboard shortcuts such as Command-C, Command-V, and Command-X when it's active. In A

  • IPad 1 internet connection issues for months--connects to modem fine

    Was hoping the 4.3 upgrade would solve my issue, but it hasn't. I've had issues with my iPad for the past few months. It connects to my wireless network and works for some time (say a day or two) and then it suddenly cannot connect to the internet. T

  • Cross dimensional analysis

    Hi, I'm not sure if this is possible or not so bear with me. We've got quite a complex cube used for sales reporting and the users want to be able to extract some additional data. To simplify it down, assume we have a number of products sold through

  • Issue of hanldle 10 million record

    Dears, Program is executed in online, and need handle 10 million records. If I  select data from database directly,  TSV_TNEW_PAGE_ALLOC_FAILED Short dump will occurs. ex: select xxx         from xxx         into table xxx. If I  select 1 million rec

  • HP Photosmart Plus B210 connects to network but cannot enable Web Services

    I am on my second HP Photosmart Plus B210 and neither printers have been able to enable Web Services. When I try to connect I get "Cannot Connect to Server". I have had my computer, router and printer settings checked by HP Support desk. I have chang