RP_provide_from_last  selecting wrong value ???

Hi experts..
In my report i had used statement ..
RP_provide_from_last P0027 SPACE PN-BEGDA PN-ENDA...
Now on selction secreen i am giving any random pernr no. 5656 along with
begda-->01011800
enda--->31129999
Although there no such data peresent for perner 5656 in the TABLE PA0027 but the rp_provide stmt is selecting the record.
i tried with clear and refresh stmt but nothing is working.
how stmt can select records if specified  pernr is not peresent .
Please help.
I will reward points.
Thanks.

Hi,
Refer to my code as follows:
at selection-screen.
  SELECT SINGLE * FROM MSEG WHERE
       MBLNR = IMBLNR.
  IF SY-SUBRC <> 0.
    MESSAGE S000(ZMM) WITH 'Please select a valid Material Number'.
  ENDIF.
Modify it according to your requirement.
Hope this helps.
Reward if helpful.
Regards,
Sipra

Similar Messages

  • Full Points sure: Wrong values populating in report (BEX)

    Hi Gurus,
    I got an Issue on CRM Report. Report is populating wrong values. 
    In the report, We have structure called “Opportunity” (in that structure fields are New opportunity, Close opportunity, Win opportunity and Open opportunity) in query and  One key figure called “Revenue”.
    On revenue we have one condition with variables.  But, in that condition everything is fine.
    The Condition Screen is like this:
    Radio Button: Single characteristic  is selected
    "Opportunity Sales ID" selected in Characteristics.
    Keyfigures:                                            
    Revenue                      New Opp                      TOP N             TOP X OPP
    Revenue                      Open Opp                     TOP N             TOP X OPP
    Revenue                      WINS                           TOP N             TOP X OPP
    Revenue                      Lost                             TOP N              TOP X OPP
    everything is right in this: If we select top 10 opportunities. we are getting wrong values
    for ex:  if we select top 10 Opportunities (in the selection screen)  means “REVENUES”.
    We are getting 12 values. 10 values are correct remaining 2 values are wrong..
    There is no Update routine for “revenue” keyfield.
    Can please suggest me on this…… What are possibilities for wrong values ...
    FULL POINTS SURE FOR THIS………………
    THANKS,
    KN

    Hi All,
    Can anybody answer... this...
    thanks,
    KR

  • How can I make a list and after selecting a value, avoid displaying it.

    Let's say I have a ListBox or a ListOfValues(in Forms), and I have as Data.
    "LEVEL 1"
    "LEVEL 2"
    "LEVEL 3"
    "LEVEL 4"
    and I select "LEVEL 2".
    next time I display the list, (been selected "LEVEL2"), it doesnt display it anymore (unless I clean it or select another value).

    I've search on google but I did not found any tutorial for this particular thing. I found instead this code : 
    on (press) {     startDrag ("", false);   
    this.swapDepths(_global.depth++);
    on (release, releaseOutside)
    stopDrag ();   
    this.swapDepths(_global.depth++);   
    if (this._x > 493.250000 && this._x < 636.050000 && this._y > 142.900000 && this._y < 271.350000)   
       this.removeMovieClip();   
        } // end if
    but I don't know how to make the _x/_y to work, better said I changed  the values but nothing happend, did I did something wrong ? The first _x/_y stands for the position? I've played with the range values but cant seem to make it happend.

  • Select multiple values from the parameters in BI Publisher report  Error

    In the database, I wrote a function to retrieve data to report:
    FUNCTION FN_TL002(cBDSID nvarchar2)
    RETURN SYS_REFCURSOR as
    TYPE t_cursor is REF CURSOR;
    v_cursor t_cursor;
    begin
    OPEN v_cursor FOR
    select Brach, txmonth, txdate, total from tl001
    where brach in (cBDSID)
    order by brach;
    RETURN v_cursor;
    end fn_tl002;
    In Bi Publisher:
    - I have a type parameter Option select multiple ( pBranch), LOV get data from database.
    * In Data model : TL001 name
    + SQL query : select FN_TL002(:pBranch) from dual
    if select a value not error, and then select two values of an error: ORA-06553: PLS-306: wrong number or types of arguments in call to 'FN_TL002'
    please help me!
    Thanks all!

    See my response in the thread Re: Multi selecting drop down in BI publisher 11g report
    The LOV is a Java array and your function needs to accept that array. To do this the data data type has to be a VARRAY Type.

  • Getting error while selecting LOV value

    Hi all,
    I am getting the below error in R12 apps while selecting the lov value from list (But it is working properly in 11i apps and loacal jdeveloper.)
    Error: Stale Data
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example).
    Cause:
    The view object ProjectInformationAM.EmployeeLOVVO1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    The lov query is select employee_number,full_name from per_all_people_f
    I have tried both internal and external lov but both cases it is showing the error in R12
    I have used below code in PR of create page, still no use
    if(!am.getEmployeelovVO1().isPreparedForExecution())
    am.getEmployeelovVO1().executeQuery();
    Row row1 = am.getEmployeelovVO1().createRow();
    am.getEmployeelovVO1().insertRow(row1);
    row1.setNewRowState(Row.STATUS_INITIALIZED);
    Except this lov all lov's working properly,
    Any one help on this it is very very urgent....
    Thanks

    Hi,
    I had a similar issue just now, and we fixed it in this way. But the case is probably different compared to your situation.
    Situation:
    - custom inquiry page
    - case: manual search, so not results based or Auto Customization Criteria
    - multiple search criteria fields
    - separate AM for all the LOV fields
    - each LOV has its own VO
    - Results table on same page, but with its own VO
    - each search criteria field has Lov mapping to the corresponding external Lov region
    Issue: when selecting a value via the Lov and coming back into the search page, I received the stale data error.
    searched lots of places and finally figured out what was wrong in my case.
    Each search field had its BC4J properties set to the VO of the results table. And since we wanted to make a manual search thing, this is not good.
    Removing the View Instance value and the View Attribute value in the properties of the search fields resolved the error.
    Hoperfully this can help other beginners, like me, in finding a solution for the same mistakes... :)
    regards
    Ronny

  • HTMLDB_APPLICATION.G_F01 has wrong value!

    HTMLDB_APPLICATION.G_F01 has wrong value!
    Hello again,
    I have a search page in my app (here the user defines the search criteria) P1.
    The page branches to P130, where the result is shown. This second page contains a region of type 'SQL Query (PL/SQL Function Body Returning SQL Query)'. The code for this dynamic query is 231 lines of code, so I want to spare you scrolling through it here . What it basically does is generating SQL QRY's such as the following:
    select     distinct(sq.SAMPLE_ID) XXX,
    'ID: '||sq.SAMPLE_ID||'
    ' ||'Type: '||sq.SAMPLE_TYPE||'
    ' ||'Collection Date: '||sq.COLLECTION_DATE SAMPLE_INFO,
    'Aliquots (T/A): '||to_char(sq.ALIQUOTS_TOTAL)|| '/' ||to_char(sq.ALIQUOTS_AVAILABLE)||'
    ' ||'Volume (T/A): '||to_char(sq.VOLUME_TOTAL,'990D00')|| '/' ||to_char(sq.VOLUME_AVAILABLE,'990D00') AVAILABILITY,
    'Age: '||sq.PATIENT_AGE||'
    ' ||'Gender: '||sq.PATIENT_SEX||'
    ' ||'Bloodtype: '||sq.BLOOD_TYPE||'
    ' PATIENT_INFO,
    DML_SERVICE.get_Diagnoses(sq.SAMPLE_ID) DIAGNOSES,
    DML_SERVICE.get_Medications(sq.SAMPLE_ID) MEDICATIONS,
    DML_SERVICE.get_Interferences(sq.SAMPLE_ID) INTERFERENCES,
    DML_SERVICE.get_LabData(sq.SAMPLE_ID) LABDATA,
    decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.text(1, '1', 1, 2)) ORDER_QTY,
    decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.checkbox(2,sq.SAMPLE_ID)) ORDER_ME
    from SEARCH_V01 sq
    where sq.DIAGNOSIS = 'D-Dimer'
    order by 1 desc
    The DML_SERVICE functions just return a string(Varchar2). At the right side of the report I have two columns, one with a textfield (ORDER_QTY, default: 1) and one with a checkbox (ORDER_ME) for each line.
    For each line where the checkbox is checked, a process (On Submit - after Comp and Val) places the order for the requested quantity (this is done by inserting an Order ID into the ALIQUOTS table -> see bold update statement below).
    The process follows:
    declare
    alq_qty number;
    alq_id number;
    cnt number;
    begin
    cnt := 0;
    for i in 1..HTMLDB_APPLICATION.G_F02.count
    loop
    select count(*) -- set alq_qty to number of available alq's
    into alq_qty
    from ALIQUOTS a
    where a.SAMPLE_ID = HTMLDB_APPLICATION.G_F02(i)
    and a.ORDER_ID = 0;
    insert into D_DEBUG (ID, DD) values (1, 'wanted: ' || HTMLDB_APPLICATION.G_F01(i) || ' available: ' || alq_qty); -- REMOVE!!!
    if alq_qty > to_number(HTMLDB_APPLICATION.G_F01(i)) then -- if there are enough alq's
    alq_qty := to_number(HTMLDB_APPLICATION.G_F01(i)); -- set alq_qty to number of ordered alq's
    end if;
    for n in 1..alq_qty
    loop
    select min(ID)
    into alq_id
    from ALIQUOTS
    where sample_id = HTMLDB_APPLICATION.G_F02(i)
    and order_id = 0;
    insert into D_DEBUG (ID, DD) values (1, 'alq_id: '||alq_id); -- REMOVE!!!
    update ALIQUOTS
    set order_id = :P130_SELECT_ORDER
    where id = alq_id;
    cnt := cnt + 1;
    end loop;
    dml_service.upd_sample_record(HTMLDB_APPLICATION.G_F02(i)); -- refresh data in SAMPLE table
    end loop;
    :P130_MSG := 'Assigned '||cnt||' aliquots to order: '||:P130_SELECT_ORDER;
    end;
    Now my problem is that this process does what it should, sometimes. When I enter 6 in one row and check the checkbox and enter 4 in another row and check that checkbox and then press SUBMIT, 10 aliquots are assigned to my order.
    Sometimes.... the other times the process just orders 2 aliquots, one of each line and disregards the number entered in the textfield.
    Or so it may seem: I added some lines to write debug info into D_DEBUG (see above.) From those entries you can assume that the content of HTMLDB_APPLICATION.G_F01(i) is in fact '1' when the process does its work. So I think the problem lies somewhere in the creation of htmldb_item.text(), (I went through the API of that htmldb_item again and again...)
    Also: I can reproduce / recreate this error. It's totally weird: for some rows it (always) works and for some it (always) doesn't !!!
    So, any help, any suggestion is really appreciated (I'm currently working on bringing the crucial part of this to marvel.oracle.com)
    -David-
    [Edited by: sleuniss on Jul 15, 2004 12:18 PM]
    Changed subject line.

    Now the subjectline is right, but the indentation is gone.... :-(
    again the SQL query:
    select     distinct(sq.SAMPLE_ID) XXX,
               'ID: '||sq.SAMPLE_ID||'
    ' ||'Type: '||sq.SAMPLE_TYPE||'
    ' ||'Collection Date: '||sq.COLLECTION_DATE SAMPLE_INFO,
               'Aliquots (T/A): '||to_char(sq.ALIQUOTS_TOTAL)|| '/' ||to_char(sq.ALIQUOTS_AVAILABLE)||'
    ' ||'Volume (T/A): '||to_char(sq.VOLUME_TOTAL,'990D00')|| '/' ||to_char(sq.VOLUME_AVAILABLE,'990D00') AVAILABILITY,
               'Age: '||sq.PATIENT_AGE||'
    ' ||'Gender: '||sq.PATIENT_SEX||'
    ' ||'Bloodtype: '||sq.BLOOD_TYPE||'
    ' PATIENT_INFO,
               DML_SERVICE.get_Diagnoses(sq.SAMPLE_ID) DIAGNOSES,
               DML_SERVICE.get_Medications(sq.SAMPLE_ID) MEDICATIONS,
               DML_SERVICE.get_Interferences(sq.SAMPLE_ID) INTERFERENCES,
               DML_SERVICE.get_LabData(sq.SAMPLE_ID) LABDATA,
               decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.text(1, '1', 1, 2)) ORDER_QTY,
               decode(to_char(sq.ALIQUOTS_AVAILABLE), '0', null, htmldb_item.checkbox(2,sq.SAMPLE_ID)) ORDER_ME
    from     SEARCH_V01 sq
    where  sq.DIAGNOSIS = 'D-Dimer'
    order    by 1 desc
    and the process:
    declare
       alq_qty number;
       alq_id number;
       cnt number;
    begin
       cnt := 0;
       for i in 1..HTMLDB_APPLICATION.G_F02.count
       loop
          select count(*) -- set alq_qty to number of available alq's
           into alq_qty
           from ALIQUOTS a
           where a.SAMPLE_ID = HTMLDB_APPLICATION.G_F02(i)
           and a.ORDER_ID = 0;
    insert into D_DEBUG (ID, DD) values (1, 'wanted: ' || HTMLDB_APPLICATION.G_F01(i) || ' available: ' || alq_qty); -- REMOVE!!!
          if alq_qty > to_number(HTMLDB_APPLICATION.G_F01(i)) then -- if there are enough alq's
             alq_qty := to_number(HTMLDB_APPLICATION.G_F01(i)); -- set alq_qty to number of ordered alq's
          end if;
          for n in 1..alq_qty
          loop
             select min(ID)
              into alq_id
              from ALIQUOTS
              where sample_id = HTMLDB_APPLICATION.G_F02(i)
              and order_id = 0;
    insert into D_DEBUG (ID, DD) values (1, 'alq_id: '||alq_id); -- REMOVE!!!
             update ALIQUOTS
              set order_id = :P130_SELECT_ORDER
              where id = alq_id;
             cnt := cnt + 1;
          end loop;
          dml_service.upd_sample_record(HTMLDB_APPLICATION.G_F02(i)); -- refresh data in SAMPLE table
       end loop;
       :P130_MSG := 'Assigned '||cnt||' aliquots to order: '||:P130_SELECT_ORDER;
    end;
    -David-

  • Color picker on Illustrator CC 2014 shows wrong values

    See the image above . The selected area filled color is e6e6e6 ( 230, 230, 230 ) but the color picker shows the wrong value 4d4d4d. Its happens only on Illustrator , What is this actually is there any problem with the color mode settings ? Please help me 

    You misunderstand me, so don’t be too quick to judge.
    I said that the Color panel was more efficient than the Color Picker. It has sliders so that you can adjust colours precisely as you wish first time, rather than just groping somewhere on a big area of colour in the Picker and then having to make fine numerical adjustments afterwards (plus an OK when you’re done).
    The Color panel is particularly useful when you are working in CMYK because it ensures that you get clean mixtures when you want them (which the Picker does not, without fine tweaking afterwards).
    And if you want to get shades of the same colour, you simply hold down Shift as you drag one of the sliders.
    In conjunction with the Swatches panel, I would go for the Color panel any time, but if you prefer the Picker that’s quite all right by me.

  • Problem in passing selection screen values using CALL TRANSACTION.

    Hi All
    I am facing problem in transfering selection screen values to the called transaction. I am trying to pass the path of the transaction filer but to no avail. The variable for filepath is not empty.
    Below is my code:
    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params.
    CLEAR wa_bdcdata.
    wa_bdcdata-program  = 'RFBASM00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'RFPDO1-FEBUMSF'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'RFPDO1-FEBUMSF'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_OKCODE'.
    wa_bdcdata-fval = 'PASS'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    opt-dismode = 'E'.
    opt-updmode = 'S'.
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    Please help.
    Harsh

    Hi Harsh,
    I think you have entered wrong main program for tcode 'FF_5' and wrong screen field for the file name. Use the below code instead of yours.
    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params,
           gv_filepath type char128 value 'C:\testfile.txt'.
    CLEAR wa_bdcdata.
    wa_bdcdata-program  = 'RFEBKA00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'UMSFILE'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'UMSFILE'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    *wa_bdcdata-fnam = 'BDC_OKCODE'.
    *wa_bdcdata-fval = 'PASS'.
    *APPEND wa_bdcdata TO lt_bdcdata.
    *CLEAR wa_bdcdata.
    opt-dismode = 'A'.
    opt-updmode = 'S'.
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    Thanks.
    Regards,
    Jey

  • How to check wrong values in isChangedByClient

    Hi,
    I had two issues with a validation code.
    First let me describe the scenario.
    We need to update the Vendor Master.
    There should one primary contact against one Vendor Number.
    There are multiple Secondary contact against one primary contact.
    There are 4 fields for both primary and secondary contact.
    Primary Contact:
    First Name (Read Only, Mandatory).
    Last Name (Read Only, Mandatrory).
    Mobile Number (Mandatory).
    Telephone (Optional).
    Secondary Contact:
    First Name (Mandatory).
    Last Name (Mandatory).
    Mobile Number (Mandatory).
    Telephone (Optional).
    So, I need to check two validations by Java Regular Expressions,
    Name should be alphabets with ,. and space.
    Telephone Number and Mobile Number would be Numbers only.
    Now, the issue client wants the Sceondary Contacts table rows
    can be modified without selecting them.
    So, I used isChangedByClient.
    That's working fine.
    But the user gives First Name as Kaushik45 in first row of the secondary contact table
    and also types First Name as Subho67 in third row.
    The first wrong value get printed (by wdComponentAPI.getMessageManager) but
    the control goes to the last wrong value.
    This might be solved by using setLeadSelectionAt(i).
    Now, when the user types values wrongly in First Name field for Row 1 and Row 3;
    the user gets stuck in First Row.
    He modifies and then click the update again.
    This time update runs and update the wrong value at row 3.
    So, solution might be storing all wrong values of the isChangedByClient in an array and then comparing one by one.
    Please suggest.
    Regards
    Kaushik Banerjee

    Hi Ilan,
    I am pasting the code below.
    public void onActionconf(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionconf(ServerEvent)
         MessageManager msgmanager=(MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();
         IPrivateMainView.IP_personNode testNodeP = wdContext.nodeP_person();
              //IPrivateMainView.IS_personNode testNodeS = wdContext.nodeS_person();
              IPrivateMainView.IS_personNode S_personNode = wdContext.nodeS_person();
             IPrivateMainView.IS_personNode spersonNode = wdContext.nodeVendorDetails().nodeS_person();
              IPrivateMainView.IP_personElement testElementP = testNodeP.currentP_personElement();
         if(testNodeP.size()!=0){
              /*If else for tesElementP Namev null value check */          
                        if(testElementP.getNamev()!=null)
                   /*Start of if-else for testElementP Mob Number */          
                                  if(testElementP.getMob_Number()!=null){
                                       String Mob_num = testElementP.getMob_Number();
                                      String regStrforPriMob=  "[0-9]*";
                                       CharSequence chSeqForMob = Mob_num;
                                       Pattern patternForPriMob = Pattern.compile(regStrforPriMob);
                                      Matcher matcherForPriMob = null;
                                       matcherForPriMob = patternForPriMob.matcher(chSeqForMob);
                                       /* Start of matcher if-else*/
                                       if(matcherForPriMob.matches()==true){
                                            if(testElementP.getTel_Number()!=null) {
                                             String tel_num = testElementP.getTel_Number();
                                             String regStrforPriTel = "[0-9]*";
                                             CharSequence chSeqForTel = tel_num;
                                             Pattern patternForPriTel = Pattern.compile(regStrforPriTel);
                                             Matcher matcherForPriTel = null;
                                             matcherForPriTel = patternForPriTel.matcher(chSeqForTel);
                                  wdComponentAPI.getMessageManager().reportSuccess("The Telephone Number of Primary Number is matching");            
                        if(matcherForPriTel.matches()==true){
                        if(S_personNode.size()!=0){
                        //IPrivateMainView.IS_personElement S_personElement = S_personNode.currentS_personElement();
                                          //  for(int i=0;i<wdContext.nodeS_person().size();i++) {
                                                      /*Start of Secondary Contact Mob Number and Tel Number if-else */     
                                                      for(int i=0;i<wdContext.nodeS_person().size();i++){
                                                        if(wdContext.nodeS_person().getS_personElementAt(i).isChangedByClient()==true){
                                                           IPrivateMainView.IS_personElement S_personElement = (IPrivateMainView.IS_personElement)S_personNode.getElementAt(i);
                                                           String fName = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Namev");
                                                           wdComponentAPI.getMessageManager().reportSuccess("The First Name for the Secondary Contact is :"+fName);                                                                                                                        
                                                           String regStrforSecfName = "[a-zA-Z-øØæÆåÅ,. ]*";
                                                           CharSequence chSeqforSecFname = fName;
                                                           Pattern patternForSecfName = Pattern.compile(regStrforSecfName);
                                                           Matcher matcherForSecfName = null;
                                                           matcherForSecfName =  patternForSecfName.matcher(chSeqforSecFname);
                                                                                                                  //String lName = S_personElement.getName1();
                                                           String lName = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Name1");
                                                           String regStrforSeclName = "[a-zA-Z-øØæÆåÅ,. ]*";
                                                           CharSequence chSeqForSecLname = lName;
                                                           Pattern patternForSeclName = Pattern.compile(regStrforSeclName);
                                                           Matcher matcherForSeclName = null;
                                                           matcherForSeclName = patternForSeclName.matcher(chSeqForSecLname);
                                                                                                                  //String Mob_NumSec = S_personElement.getMob_Number();
                                                          String Mob_NumSec = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Mob_Number");
                                                           String regStrforSecMob ="[0-9]*";
                                                           CharSequence chSeqForMobSec = Mob_NumSec;
                                                           Pattern patternForSecMob = Pattern.compile(regStrforSecMob);
                                                           Matcher matcherForSecMob = null;
                                                           matcherForSecMob = patternForSecMob.matcher(chSeqForMobSec);
                                                        if(S_personElement.getMob_Number()!=null&&S_personElement.getNamev()!=null&&S_personElement.getName1()!=null){
                                                           //String fName = S_personElement.getNamev();
                                                                                    /* Start of matcher if-else*/
                                                           if(matcherForSecfName.matches()==true&&matcherForSeclName.matches()==true&&matcherForSecMob.matches()==true){
                                                           /* Start of City if-else */
                                                           if(S_personElement.getTel_Number()!=null){
                                                             String Tel_NumSec = wdContext.nodeS_person().getElementAt(i).getAttributeAsText("Tel_Number");
                                                             String regStrforSecTel = "[0-9]*";
                                                             CharSequence chSeqForTelSec = Tel_NumSec;
                                                             Pattern patternForSecTel = Pattern.compile(regStrforSecTel);
                                                             Matcher matcherForSecTel = null;
                                                             matcherForSecTel = patternForSecTel.matcher(chSeqForTelSec);
                                                           /* Start of matcher if-else */
                                                           if(matcherForSecTel.matches()==true&&matcherForSecfName.matches()==true&&matcherForSeclName.matches()==true&&matcherForSecMob.matches()==true){
                                                 wdComponentAPI.getMessageManager().reportSuccess("The First Name matches the pattern: "+matcherForSecfName.matches());               
                                                                                               if(wdContext.currentCheckboxckElement().getCorrespondence()==true){
             wdComponentAPI.getMessageManager().reportSuccess("Entering the if statement for executing the RFC");
                                                                                              wdThis.wdGetVdapplicationController().updVendorDetails();
                                                                                              wdThis.wdFirePlugToFinal();
                                                                                              //break;
                                                                                              else
                                                                                              {   IWDAttributeInfo atinfo = wdContext.nodeCheckboxck().getNodeInfo().getAttribute("Correspondence");
                                                                                              msgmanager.reportContextAttributeMessage(wdContext.nodeCheckboxck().getCurrentElement(),atinfo,IMessageVdapplication.KEY4,new Object[]{},true);
                                                                                              //wdComponentAPI.getMessageManager().reportException("Kryss av for korrekt informasjon før lagring",true);
                                                                                              } /* End of check box if else*/
                                                           } /* End of Secondary Contact Telephone Number matching */
                                                           else {
                                                                wdComponentAPI.getMessageManager().raiseException("The Secondary Contact Telephone Number is not matching",true);
                                                                } /* End of Secondary Telephone Number if */     
                                                             /* End of matcher if-else*/
                                                             else {
                                                                //wdComponentAPI.getMessageManager.re("The Mobile Number is not in the correct format for Secondary contact",true);
                                                    wdComponentAPI.getMessageManager().reportSuccess("The First Name was : "+wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev"));
                                                    //Object[] firName = new Object<i>;
                                                   // firName<i> = wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev");
                                                    wdContext.nodeS_person().setLeadSelection(i);      
    //                                                for(int j=0;j<firName.length;j++)
                                                      /*  try {
                                                                          String fuName = wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev").toString();
                                                                          wdComponentAPI.getMessageManager().reportSuccess("The Value of fuName: "+fuName);
                                                                                                                                           //String fName = S_personElement.getNamev();
                                                                          String regStrforFuName = "[a-zA-Z-øØæÆåÅ,. ]*";
                                                                          CharSequence chSeqforFuName = fuName;
                                                                          wdComponentAPI.getMessageManager().reportSuccess("The Value of CharSequence "+chSeqforFuName);
                                                                          Pattern patternForSecFuName = Pattern.compile(regStrforFuName);
                                                                          Matcher matcherForSecFuName = null;
                                                                          matcherForSecFuName =  patternForSecFuName.matcher(chSeqforFuName);
                                                                          wdComponentAPI.getMessageManager().reportSuccess("The matcherForSecFuName is "+matcherForSecFuName);
                                                                          if(matcherForSecFuName.matches()==false){
                                                                          wdComponentAPI.getMessageManager().reportException("Error in the First Name",true);
                                                         catch(ArrayIndexOutOfBoundsException ae){
                                                              ae.printStackTrace();
                                                         catch(Exception e){
                                                              e.printStackTrace();
                                                   //String fuName = wdContext.nodeS_person().getElementAt(i).getAttributeValue("Namev");
                                                                wdComponentAPI.getMessageManager().reportException("The First Name, Last Name or Mobile Number is not in the correct format for Secondary contact",true);
                          //     break;
                                                        else {
                                                                                                               wdComponentAPI.getMessageManager().raiseException("First Name, Last Name, Mobile Number is blank",true);
                                               else {
                                                    wdComponentAPI.getMessageManager().raiseException("The Telephone Number of the Primary Contact is in the Correct format",true);
                                            } /* Telephone Number element null*/
                                            //else{}
                        /*Start of Secondary Contact Size if-else */                    
                                  /* End of if-else for Secondary Contact Size */
    //                 else {
    //                      wdComponentAPI.getMessageManager().reportException("The Mobile No of the Primary Contact is not in the correct format",true);                            
                        /* End of matcher if-else for Primary Contact*/
                        else{
                             wdComponentAPI.getMessageManager().reportException("Primary Contact Mobile Nunber is not in the correct format",true);
                   /* if for testElementP Mob Number */
                   else {
                        wdComponentAPI.getMessageManager().reportException("No Primary Contact Mobile Number",true);
              } /* End of If else for tesElementP Namev null value check */     
                        else {
                             wdComponentAPI.getMessageManager().reportException("There is no First Name for Primary Contact",true);          
        }// else if for testNodeP size closed
        else{
             wdComponentAPI.getMessageManager().reportException("There is no element in Primary Contact",true);
        //@@end
    Regards
    Kaushik Banerjee

  • WRONG VALUE OF THE parameter file type(bdc-session method)

    Hi experts,
    when iam uploading vendor details,,,
    it is giving above error.
    chk the code once.....
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       FILENAME                      = 'C:/VENDOR1.TXT'
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = IT_UPLOAD.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
       CLIENT                    = SY-MANDT
       GROUP                     = 'SRR'
       USER                      = SY-UNAME.

    Hi here  iam sending the whole code once to you. just chk it once and same error(WRONG VALUE OF THE parameter file type) is coming after the changes.
    if i use asc it is giving that no file exists.
    Table Declaration
    tables :rf02k,    "Maintain vendor master record screen and work fields
            lfa1,     "Vendor Master(general)
            lfbk,     "Vendor Master (Bank Details)
            lfb1,     "Vendor Master (Company Code)
            lfm1,     "Vendor master record purchasing organization data
            lfb5.     "Vendor master (dunning data)
    Data Declaration
    data : begin of it_UPLOAD occurs 0,
           LIFNR like rf02k-lifnr,     "vendor no
           BUKRS like rf02k-bukrs,     "company code
           EKorg like rf02k-ekorg,     "purchasing org
           KTOKK like rf02k-ktokk,     "account group
           anred like lfa1-anred,     "initial
           name1 like lfa1-name1,     "name of vendor
           sortl like lfa1-sortl,     "search term
           land1 like lfa1-land1,     "country
           akont like lfb1-akont,     "reconcillation a/c.
           fdgrv like lfb1-fdgrv,     "planning group
           zterm like lfb1-zterm,     "terms of payment key
           mahna like LFB5-MAHNA,     "dunning procedure
           waers like lfm1-waers,     "Purchase order currency
           END OF IT_UPLOAD.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    include bdcrecx1.
    start-of-selection.
    UPLOADING THE DATA TO IT_UPLOAD
    call function 'GUI_UPLOAD'
    exporting
    filename = 'C:\DASRR\VENDOR1.TXT'
    filetype = 'DAT'
    has_field_separator = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = IT_UPLOAD
    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.
    *CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME                      = 'C:/VENDOR1.TXT'
      FILETYPE                      = 'DAT'
    TABLES
       DATA_TAB                      = IT_UPLOAD.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
       CLIENT                    = SY-MANDT
       GROUP                     = 'SRR'
       USER                      = SY-UNAME.
      POPULATE INTERNAL TABL
    LOOP AT IT_UPLOAD.
    CLEAR IT_BDCDATA.
    REFRESH IT_BDCDATA.
    PERFORM POPULATE_DATA.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
        TCODE                  = 'XK01'
       TABLES
        DYNPROTAB              = IT_BDCDATA.
    ENDLOOP.
    *&      Form  POPULATE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_DATA .
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0100'.
    perform getdata using ' ' RF02K-LIFNR 'IT_UPLOAD-LIFNR'.
    perform getdata using ' ' RF02K-bukrs 'IT_UPLOAD-bukrs'.
    perform getdata using ' ' RF02K-EKORG 'IT_UPLOAD-EKORG'.
    perform getdata using ' ' RF02K-KTOKK 'IT_UPLOAD-KTOKK'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0110'.
    perform getdata using ' ' LFA1-ANRED 'IT_UPLOAD-ANRED'.
    perform getdata using ' ' LFA1-NAME1 'IT_UPLOAD-NAME1'.
    perform getdata using ' ' LFA1-SORTL 'IT_UPLOAD-SORTL'.
    perform getdata using ' ' LFA1-LAND1 'IT_UPLOAD-LAND1'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0210'.
    perform getdata using ' ' LFB1-AKONT 'IT_UPLOAD-AKONT'.
    perform getdata using ' ' LFB1-FDGRV 'IT_UPLOAD-FDGRV'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0215'.
    perform getdata using ' ' LFB1-ZTERM 'IT_UPLOAD-ZTERM'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0220'.
    perform getdata using ' ' LFB5-MAHNA 'IT_UPLOAD-MAHNA'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0310'.
    perform getdata using ' ' LFM1-WAERS 'IT_UPLOAD-WAERS'.
    ENDFORM.                    " POPULATE_DATA
    *&      Form  GETDATA
          text
         -->P_0213   text
         -->P_0214   text
         -->P_0215   text
    FORM GETDATA  USING    VALUE(P_0213)
                           VALUE(P_0214)
                           VALUE(P_0215).
                        IF P_0213  = 'X'.
                        IT_BDCDATA-PROGRAM = P_0213.
                        IT_BDCDATA-DYNPRO = P_0214.
                        IT_BDCDATA-DYNBEGIN = P_0215.
                        ELSE.
                        IT_BDCDATA-FNAM = P_0214.
                        IT_BDCDATA-FVAL = P_0215.
                        ENDIF.
    ****************any error in coding just chk it*****************

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • Entering a Value and Tabbing out of af:inputListOfValues displays the wrong value

    Good morning. I am having an issue with the autosubmit and tabbing out of af:inputListOfValues in my code.
    Problem: When I type in a valid value and tab out of the field, it ignores the value I entered and displays whatever the first list in the query result instead regardless of the value I typed.
    My code snippet. What it does is simply an LoV search of Employee No attached to an entity attribute and depending on selection, it will display the Employee Name within the page. (it also retrieves a table view depending what employee number was entered)
    <af:inputListOfValues id="empNoId"
                 popupTitle="Search and Select: #{bindings.EmpNo.hints.label}"
                  value="#{bindings.EmpNo.inputValue}"
                  label="#{bindings.EmpNo.hints.label}"
                  model="#{bindings.EmpNo.listOfValuesModel}"
                  required="#{bindings.EmpNo.hints.mandatory}"
                  columns="#{bindings.EmpNo.hints.displayWidth}"
                 shortDesc="#{bindings.EmpNo.hints.tooltip}"
                   binding="#{workLocationBean.txtEmpNo}"
                  partialTriggers="id1"
                 valueChangeListener="{bean.onEmpNoChange}"    
                 autoSubmit="true">
            <f:validator binding="#{bindings.EmpNo.validator}"/>
      </af:inputListOfValues>
    Other things to note:
    When I enter a valid employee number and click anywhere in the page (not TAB), it behaves correctly.
    I have been trying to figure this out for days. Even my valueChangeListener gets the wrong value (when I do System.out) when I tab out so I am not sure where to catch it and replace it with the correct value.
    Thank you.

    This usually happens when primary key is not set in view object used by LOV.
    Dario

  • Issue: - FBL1N - is showing wrong values

    Issue: - FBL1N - is showing wrong values    
    Hi SAP experts,
    We are executing T Code FBL1N and selecting all open enteries, and select all items like special normal items, G/L Transaction, noted items, parked items and customer items, we found that the balance is showing wrong for intercompany vendors.
    For Ex, if vendor is not created in company Code A and customer items are available in Company Code A then that items are coming for some line items and for some line items it is not?
    I have attached one example for the same. for all vendors data is coming properly but for indivisual vendor is it not.
    Please suggest why?
    Regards,
    Vijay

    Example :
    Vendor number 99 ans for the same  customer nO is C12 is created in company code ABC but vendor is not created and customer C12 is in PQR, now i am executing fbl1n for Company Code PQR for open item selecting all options like normal items, special G/L transaction, customer items  noted items and parked items, the line items related to Vendor number 99 for company Code PQR should not display, as vendor is not created but customer items are there, please let me know for some cases it is showing result and in same cases it is not why?
    Regards,
    Vijay

  • ALV grid abort processing, if wrong value

    Hello,
    i've a editable alv grid.
    Is it possible to abort at event data_changed/data_changed_finished, if an value is wrong (f.e. to high < 500), and write the old value back.
    Best regards,
    TomSd

    Hello Thomas
    The sample report <b>ZUS_SDN_ALVGRID_EDITABLE_10</b> provides a possible (perhaps not the most elegant) solution for your problem.
    *& Report  ZUS_SDN_ALVGRID_EDITABLE_10
    *& Description: Reset false values entered in editable ALV list
    *&              to original values
    *& Example:     Column SORT_KEY allows values from '000'-'150'
    *               -> reset if value > '010'
    *& Thread: ALV grid abort processing, if wrong value
    *& Link: https:||<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="669430"></a>
    REPORT  zus_sdn_alvgrid_editable_10.
    TYPE-POOLS: abap.
    INCLUDE <icon>.  " NOTE: replace by TYPE-POOLS: icon. on >= 6.20
    DATA:
      gd_repid         TYPE syrepid,
      gd_okcode        TYPE sy-ucomm,
      gs_layout        TYPE lvc_s_layo,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid          TYPE REF TO cl_gui_alv_grid.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                          WITH DEFAULT KEY.
    DATA:
      gt_outtab        TYPE ty_t_outtab,
      gt_outtab_pbo    TYPE ty_t_outtab.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          mo_data_changed    TYPE REF TO cl_alv_changed_data_protocol.
        CLASS-METHODS:
          handle_data_changed
            FOR EVENT data_changed OF cl_gui_alv_grid
            IMPORTING
              er_data_changed
              e_onf4
              e_onf4_before
              e_onf4_after
              e_ucomm
              sender,
          handle_data_changed_finished
            FOR EVENT data_changed_finished OF cl_gui_alv_grid
            IMPORTING
              e_modified
              et_good_cells,
          handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING
              e_ucomm,
          handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING
              e_object
              e_interactive.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_data_changed.
    *   define local data
        DATA:
          ld_idx     TYPE i,
          ls_cell    TYPE lvc_s_modi,
          ls_msg     TYPE symsg.
        FIELD-SYMBOLS:
          <lt_outtab>  TYPE ty_t_outtab,
          <ls_outtab>  TYPE ty_s_outtab.
        ASSIGN er_data_changed->mp_mod_rows->* TO <lt_outtab>.
        LOOP AT er_data_changed->mt_mod_cells INTO ls_cell
                WHERE ( fieldname = 'ZUAWA' ).
          ld_idx = syst-tabix.
          IF ( ls_cell-value <= '010' ).
            READ TABLE <lt_outtab> ASSIGNING <ls_outtab> INDEX ld_idx.
            MODIFY gt_outtab FROM <ls_outtab> INDEX ls_cell-row_id. " !!!
          ELSE.
            CLEAR: ls_msg.
            ls_msg-msgv1 = 'Value'.
            ls_msg-msgv2 = ls_cell-value.
            ls_msg-msgv3 = 'too high (> 010)'.
            CALL METHOD er_data_changed->add_protocol_entry
              EXPORTING
                 i_msgid     = '00'
                 i_msgty     = 'E'
                 i_msgno     = '398'
                 i_msgv1     = ls_msg-msgv1
                 i_msgv2     = ls_msg-msgv2
                 i_msgv3     = ls_msg-msgv3
    *             I_MSGV4     =
                 i_fieldname = ls_cell-fieldname
                 i_row_id    = ls_cell-row_id
                 i_tabix     = ls_cell-tabix.
            DELETE er_data_changed->mt_mod_cells  INDEX ld_idx.
            DELETE er_data_changed->mt_good_cells INDEX ld_idx.
          ENDIF.
        ENDLOOP.
        IF ( syst-subrc = 0 ).
          er_data_changed->display_protocol( ).
        ENDIF.
    **    cl_gui_cfw=>set_new_ok_code( 'REFRESH' ). " not possible on 4.6c
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DUMMY'
    *      IMPORTING
    *        RC       =
      ENDMETHOD.                    "handle_data_changed
      METHOD handle_data_changed_finished.
    *   define local data
        DATA:
          ls_outtab      TYPE ty_s_outtab,
          ls_cell        TYPE lvc_s_modi.
      ENDMETHOD.                    "handle_data_changed_finished
      METHOD handle_user_command.
      ENDMETHOD.                    "handle_user_command
      METHOD handle_toolbar.
    *   define local data
        DATA:
          ls_button    TYPE stb_button.
        ls_button-function  = 'DEFAULT'.
        ls_button-icon      = icon_mass_change.
        ls_button-quickinfo = 'Set default value for column'.
        APPEND ls_button TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT * FROM knb1 INTO TABLE gt_outtab UP TO 20 ROWS
        WHERE bukrs = '1000'.
      gt_outtab_pbo = gt_outtab.  " store PBO data
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid
        EXPORTING
          i_parent          = go_docking
        EXCEPTIONS
          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.
    * Build fieldcatalog
      PERFORM build_fieldcatalog.
      PERFORM set_layout.
      SET HANDLER:
        lcl_eventhandler=>handle_toolbar               FOR go_grid,
        lcl_eventhandler=>handle_data_changed          FOR go_grid,
        lcl_eventhandler=>handle_data_changed_finished FOR go_grid.
    * Display data
      CALL METHOD go_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_outtab       = gt_outtab
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          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.
      go_grid->set_toolbar_interactive( ).
      CALL METHOD go_grid->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter
        EXCEPTIONS
          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.
    * Link the docking container to the target dynpro
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          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.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    * Flow logic (no elements on screen):
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
      CALL METHOD go_grid->refresh_table_display
    *      EXPORTING
    *        IS_STABLE      =
    *        I_SOFT_REFRESH =
        EXCEPTIONS
          finished       = 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.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      TRANSLATE gd_okcode TO UPPER CASE.
    * Fetch changes on ALV grid
      go_grid->check_changed_data( ).
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'DUMMY'. " do nothing but pass PAI -> list refresh at PBO
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG_KNB1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNB1'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_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.
      " Set required fields editable
      LOOP AT gt_fcat INTO ls_fcat
                      WHERE ( fieldname = 'ZUAWA'  OR
                              fieldname = 'BUSAB' ).
        ls_fcat-edit    = abap_true.
        MODIFY gt_fcat FROM ls_fcat.
      ENDLOOP.
      DELETE gt_fcat WHERE ( fieldname = 'ZINRT' ).
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SET_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_layout .
      CLEAR: gs_layout.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-zebra      = abap_true.
    **  gs_layout-stylefname = 'CELLTAB'.
    ENDFORM.                    " SET_LAYOUT
    Regards,
      Uwe

  • SESSION METHOD( WRONG VALUE OF THE parameter file type)

    Hi here iam sending the whole code once to you. just chk it once and same error(WRONG VALUE OF THE parameter file type) is coming after the changes.
    if i use asc it is giving that no file exists.
    Table Declaration
    tables :rf02k, "Maintain vendor master record screen and work fields
    lfa1, "Vendor Master(general)
    lfbk, "Vendor Master (Bank Details)
    lfb1, "Vendor Master (Company Code)
    lfm1, "Vendor master record purchasing organization data
    lfb5. "Vendor master (dunning data)
    Data Declaration
    data : begin of it_UPLOAD occurs 0,
    LIFNR like rf02k-lifnr, "vendor no
    BUKRS like rf02k-bukrs, "company code
    EKorg like rf02k-ekorg, "purchasing org
    KTOKK like rf02k-ktokk, "account group
    anred like lfa1-anred, "initial
    name1 like lfa1-name1, "name of vendor
    sortl like lfa1-sortl, "search term
    land1 like lfa1-land1, "country
    akont like lfb1-akont, "reconcillation a/c.
    fdgrv like lfb1-fdgrv, "planning group
    zterm like lfb1-zterm, "terms of payment key
    mahna like LFB5-MAHNA, "dunning procedure
    waers like lfm1-waers, "Purchase order currency
    END OF IT_UPLOAD.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    include bdcrecx1.
    start-of-selection.
    UPLOADING THE DATA TO IT_UPLOAD
    call function 'GUI_UPLOAD'
    exporting
    filename = 'C:\DASRR\VENDOR1.TXT'
    filetype = 'DAT'
    has_field_separator = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = IT_UPLOAD
    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.
    *CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = 'C:/VENDOR1.TXT'
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = IT_UPLOAD.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    GROUP = 'SRR'
    USER = SY-UNAME.
    POPULATE INTERNAL TABL
    LOOP AT IT_UPLOAD.
    CLEAR IT_BDCDATA.
    REFRESH IT_BDCDATA.
    PERFORM POPULATE_DATA.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = 'XK01'
    TABLES
    DYNPROTAB = IT_BDCDATA.
    ENDLOOP.
    *& Form POPULATE_DATA
    text
    --> p1 text
    <-- p2 text
    FORM POPULATE_DATA .
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0100'.
    perform getdata using ' ' RF02K-LIFNR 'IT_UPLOAD-LIFNR'.
    perform getdata using ' ' RF02K-bukrs 'IT_UPLOAD-bukrs'.
    perform getdata using ' ' RF02K-EKORG 'IT_UPLOAD-EKORG'.
    perform getdata using ' ' RF02K-KTOKK 'IT_UPLOAD-KTOKK'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0110'.
    perform getdata using ' ' LFA1-ANRED 'IT_UPLOAD-ANRED'.
    perform getdata using ' ' LFA1-NAME1 'IT_UPLOAD-NAME1'.
    perform getdata using ' ' LFA1-SORTL 'IT_UPLOAD-SORTL'.
    perform getdata using ' ' LFA1-LAND1 'IT_UPLOAD-LAND1'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0210'.
    perform getdata using ' ' LFB1-AKONT 'IT_UPLOAD-AKONT'.
    perform getdata using ' ' LFB1-FDGRV 'IT_UPLOAD-FDGRV'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0215'.
    perform getdata using ' ' LFB1-ZTERM 'IT_UPLOAD-ZTERM'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0220'.
    perform getdata using ' ' LFB5-MAHNA 'IT_UPLOAD-MAHNA'.
    PERFORM GETDATA USING 'X' 'SAPMF02K' '0310'.
    perform getdata using ' ' LFM1-WAERS 'IT_UPLOAD-WAERS'.
    ENDFORM. " POPULATE_DATA
    *& Form GETDATA
    text
    -->P_0213 text
    -->P_0214 text
    -->P_0215 text
    FORM GETDATA USING VALUE(P_0213)
    VALUE(P_0214)
    VALUE(P_0215).
    IF P_0213 = 'X'.
    IT_BDCDATA-PROGRAM = P_0213.
    IT_BDCDATA-DYNPRO = P_0214.
    IT_BDCDATA-DYNBEGIN = P_0215.
    ELSE.
    IT_BDCDATA-FNAM = P_0214.
    IT_BDCDATA-FVAL = P_0215.
    ENDIF.

    When u use GUI_UPLOAD, U can not assign file type as 'dat'. This must be either ASC or BIN.
    Make sure  ur flat file path should correct..
    This well help u...

Maybe you are looking for

  • How to update column in Oracle SQL Developer?

    Hi everybody, How can I update table in Oracle SQL Developer like in PL/SQL Developer use: Select * from table for update; Thank you~

  • ABAP-HR Issue

    Hi Experts, I know payroll periods. By using that periods i want to get BEGDA and ENDDA. Can anybody explain with code?

  • Stretching a box in pages v6

    How do I alter the relative dimensions (lebgth and height) of a box in Pages 6. When I drag one of the handles the box retains its proportions. I can see a "constrian proportions" tick box in the inspector but it is grey'ed out

  • Use calculated field(s) in other report

    Hi everyone, Is there a way to use a calculated field by itself in another report? I don't want to insert a sub report because it takes up too much space. I just need to use few fields in other calculations in the new report. Thank you

  • Calculations using Contrl Break Statements

    Hi, My internal table consists of 7 columns and i want to add all the fields in column E at end of every field in column C. How can i do that. i have used "at end of TXJCD" but it is not working.   A       B             C                  D