Dynamic call for records in a table

hI,
Im having a ztable, the structure is as follows:
tabold fldold tabnew fldnew
The records in this table is are:
1.yvbap  posnr xvbap posnr
2.yvbak  auart xvbak auart
3.yvbak  augru xvbak augru.
Now, i have to use this table dynamically to check each and every record in the program:mv45afzz.
So, my problem is that, i have to dynamically pass these records which contains table name and its field name.
i can write as: xvbap-posnr = yvbap-posnr for all the three records (the values will come from sales order tranx, report: mv45afzz)
but in future if the records are added then i have to again change the code, so this shouldn't happen.
It should dynamically call all the records in this table and check the condition.
Thanx
Rohith

Hello Rohith
What is your question???
You described a few ingredients of your scenario (not all of them) and do not really explain your requirements.
Given the descriptions of the Z-table fields I assume you need to check whether OLD values are equal to NEW values.
If this assumption is correct then the solution is quite simple (except for XVBAP / YVBAP: Does this mean single entries or looping over all entries?)
DATA:
  lt_ztable     TYPE STANDARD TABLE OF zstructure,
  ls_ztable     TYPE zstructure.
  FIELD-SYMBOLS:
    <lt_tab>     TYPE table,
    <ls_struct_old>    TYPE any,
    <ls_struct_new>   TYPE any,
    <ld_old>    TYPE any,
   <ld_new>    TYPE any.
" Read entries from z-table
  SELECT * FROM ztable INTO table lt_ztable.
  LOOP AT lt_ztable INTO ls_ztable.
    ASSIGN (ls_ztable-tabold) TO <ls_struct_old>.
    ASSIGN (ls_ztable-tabnew) TO <ls_struct_new>.
    ASSIGN COMPONENT (ls_ztable-fldold) OF STRUCTURE <ls_struct_old> TO <ld_old>.
    ASSIGN COMPONENT (ls_ztable-fldnew) OF STRUCTURE <ls_struct_new> TO <ld_new>.
    IF ( <ld_old> = <ld_new> ).
      " do something...
    ENDIF.
  ENDLOOP.
For the sake of simplicity I did not add the required statements for checking successful ASSIGN's.
Regards
  Uwe

Similar Messages

  • Dynamic call for a ref cursor: ORA-21779

    Hi,
    Here is an environment:
    create or replace
    PACKAGE PKG_GETDATA AS
    TYPE cursor_type IS REF CURSOR;
    Procedure SimpleGet (cData In Out Cursor_type);
    Procedure DynamicGet (cData In Out Cursor_type);
    END PKG_GETDATA;
    create or replace
    PACKAGE BODY "PKG_GETDATA" AS
    Procedure SimpleGet (cData In Out Cursor_type) As
    Begin
    Open cData For
    Select 1 from Dual;
    End SimpleGet;
    Procedure DynamicGet (cData In Out Cursor_type) As
    Begin
    Execute Immediate 'Begin PKG_GETDATA.SIMPLEGET(:1); End;'
    Using In Out cData;
    End DynamicGet;
    END PKG_GETDATA;
    So- first simple get works fine:
    Declare
    cData PKG_GETDATA.Cursor_type;
    aNumber Number;
    Begin
    PKG_GETDATA.SimpleGet (cData);
    LOOP
    FETCH cData INTO aNumber;
    EXIT WHEN cData%ROWCOUNT > 5 OR cData%NOTFOUND;
    dbms_output.put_line (aNumber);
    END LOOP;
    close cData;
    End;
    BUT dynamic call does not works at all!:
    Declare
    cData PKG_GETDATA.Cursor_type;
    aNumber Number;
    Begin
    PKG_GETDATA.DynamicGet (cData);
    LOOP
    FETCH cData INTO aNumber;
    EXIT WHEN cData%ROWCOUNT > 5 OR cData%NOTFOUND;
    dbms_output.put_line (aNumber);
    END LOOP;
    close cData;
    End;
    It throws ORA-21779 exception; what is more- it does work on 10.2 db version but does not work on 11.2 version! Could anyone explain that?
    Regards
    Bartlomiej D.

    Hi,
    Believe me, it may be very handful while working with handlers.
    Anyway- could anyone help me on that?
    Regards
    Bartlomiej D.

  • How to get count as 0 for records not in table

    Hi All,
    I have requirement where I need count of records in the table based on ids. Example query below
    SELECT empid ,
    nvl(COUNT(id), 0) empcount
    FROM employee
    WHERE empid IN(1, 2, 4, 5)
    GROUP BY empid
    In the table only record for "empid=2" is present so I get count 1 for it. But with it I should get count as 0 for non existing records. Expecting below output
    empid | empcount
    1 | 0
    2 | 1
    4 | 0
    5 | 0
    Appreciate your help and Thanks in advance.
    Regards.
    Ashish

    e.g.
    SQL> select column_value deptno, count (deptno)
    from emp, table (sys.odcinumberlist (10, 20, 100))
    where deptno(+) = column_value
    group by column_value
        DEPTNO COUNT(DEPTNO)
            10             3
            20             5
           100             0
    3 rows selected.

  • Search for records in a table on the basis of a function

    Hi,
    How is it possible to use a function as search criteria in a sql query ?
    For example, I have the following query :
    select a.job_name JOB_NAME, substr(a.job_name,instr(a.job_name,'.',-1)+1) as AUTNAME
    FROM autosys.job a
    where a.job_name like %PRD%' and a.command like '%dsjob%'
    and a.command not like 'substr(a.job_name,instr(a.job_name,'.',-1)+1)';
    This is now working because of the use of function "substr" on the right side of the query.
    How can I write the query so as to find the same result as using this function ?
    Can someone help me out on this ?
    Thanks

    Among other things, you have the quotes in the wrong place in the NOT LIKE predicate. As posted, you are searching for records where command does not contain the literal string substr(a.job_name,instr(a.job_name,'.',-1)+1). I don't think that is really what you are after. You need to concatenate the operators to the results of the SUBSTR function. Something more like:
    SELECT a.job_name job_name,
           SUBSTR(a.job_name, INSTR(a.job_name, '.', -1)+1) as autname
    FROM autosys.job a
    WHERE a.job_name LIKE 'HP.TM.%PRD.%' and
          a.command LIKE '%dsjob.sh%' and
          a.command NOT LIKE '%'||SUBSTR(a.job_name, INSTR(a.job_name, '.', -1)+1)||'%'; John

  • Dynamic call for ADOBE FORMS

    Hi ,
    I want to call Adobe forms with dynamic table .
    Some one please explain me how I can implement this in ADOBE interface ?
    Any Pointers or Help higly appreciated.
    Thanks
    James

    hi
    Check this
    Difference between Smart Forms and Adobe Form
    Re: Smart Forms & Adobe Forms
    Adobe forms
    /message/4983958#4983958 [original link is broken]
    Re: adobe forms
    adobe forms
    adobe forms
    adobe forms

  • Query for records on single table

    Hi experts,
    I have table as below.
    ID
    DATE
    BALANCE
    1
    1-Sep-13
    50
    2
    1-Sep-13
    60
    3
    1-Sep-13
    65
    4
    1-Sep-13
    70
    5
    1-Sep-13
    40
    6
    1-Sep-13
    35
    1
    2-Sep-13
    55
    2
    2-Sep-13
    65
    3
    2-Sep-13
    45
    4
    2-Sep-13
    75
    5
    2-Sep-13
    45
    6
    2-Sep-13
    30
    1
    3-Sep-13
    78
    5
    3-Sep-13
    86
    6
    3-Sep-13
    75
    Now I want to select ID's  which are not in '3-Sep-13' and in '2-Sep-13' or '1-Sep-13' .
    can any one help me out?

    Thej wrote:
    Hi experts,
    I have table as below.
    ID
    DATE
    BALANCE
    1
    1-Sep-13
    50
    2
    1-Sep-13
    60
    3
    1-Sep-13
    65
    4
    1-Sep-13
    70
    5
    1-Sep-13
    40
    6
    1-Sep-13
    35
    1
    2-Sep-13
    55
    2
    2-Sep-13
    65
    3
    2-Sep-13
    45
    4
    2-Sep-13
    75
    5
    2-Sep-13
    45
    6
    2-Sep-13
    30
    1
    3-Sep-13
    78
    5
    3-Sep-13
    86
    6
    3-Sep-13
    75
    Now I want to select ID's  which are not in '3-Sep-13' and in '2-Sep-13' or '1-Sep-13' .
    can any one help me out?
    Is the column you show as "DATE" really named "DATE"?  If so, that's A Bad Thing (tm).  Never use reserved or key words as object names.  It should have a descriptive name, like CLOSING_DATE, or whatever is appropriate in the context of the application.
    Second, what is the data type of your DATE column?  It better be DATE.  If not, you are starting from a very bad design.  In any event, the solution will depend on the data type.

  • Dynamic Name for Yellow Interface Table

    Hi All,
    Can anybody guide me how to use dynamic name for Yellow Interface Target Table.
    Eg: T_SESSIONID.
    I tried
    1)Refreshing the SESSIONID in a Variable V1 and using T_#V1 directly
    2) Refreshing the T_#V1 in a Variable V2 and using #V2
    But its not creating properly.
    Please guide.

    You want to create dynamic target table name right?
    You can refresh a variable like #GET_SESSION
    #GET_SESSION= SELECT <%=odiRef.getSession("SESS_NAME")%> FROM DUAL
    My tmp table name like TMP_#GET_SESSION
    then in your package refresh #GET_SESSION variable and you can use it.
    I hope this can be helpful
    Thanks

  • How to call webservice for each record in a table using ODI

    Hi
    I am new to ODI and Webservice. I want to invoke a scenario in ODI using web service. I hava a weblogic application server with axis 2 deployed.
    But I want call webservice for each record in a table
    For eg: "EMP" table have 50 records, for each record web service should invoke
    Can any one help me on it.
    Thanks,
    phani
    Edited by: user12774166 on Jun 6, 2010 11:16 PM

    If your goal is "call" a web service, Jason's Straub's [flex-ws-api|https://flex-ws-api.samplecode.oracle.com/] is by far the best I've seen. You might want read more about it on [his blog|http://jastraub.blogspot.com/search?q=+flex_ws_api+].
    Tyler Muth
    http://tylermuth.wordpress.com
    [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://sn.im/aos.book]

  • Hi All, Pls send me the recording for va01 by handling table control

    Hi All, Pls send me the recording for va01 by handling table control with 3 or more materials. Pls send me a flat file and code ASAP.
    Thanks&regards.
    Bharat

    Here is a example of similar kind ..plz go through this doc..it will be help hul 4 u
    How to deal with table control / step loop in BDC?
    Steploop and table contol is inevitable in certain transactions. When we run BDC for such transactions, we will face the situation: how many visible lines of steploop/tablecontrol are on the screen? Although we can always find certain method to deal with it, such as function code 'NP', 'POPO', considering some extreme situation: there is only one line visible one the screen,
    our BDC program should display an error message. (See transaction 'ME21', we you resize your screen to let only one row visible, you can not enter mutiple lines on this screen even you use 'NP')
    Now, I find a method with which we can determine the number of visible lines on Transaction Screen from our Calling BDC program. Maybe it is useless to you, but I think it will give your some idea.
    Demo ABAP code has two purposes:
    1. how to determine number of visible lines and how to calculte page number; (the 'calpage' routine has been modify to meet general purpose usage)
    2. using field symbol in BDC program, please pay special attention to the difference in Static
    ASSIGN and Dynamic ASSIGN.
    Now I begin to describe the step to implement my method:
    (I use transaction 'ME21', screen 121 for sample, the method using is Call Transation Using..)
    Step1: go to screen painter to display the screen 121, then we can count the fixed line on this screen, there is 7 lines above the steploop and 2 lines below the steploop, so there are total 9 fixed lines on this screen. This means except these 9 lines, all the other line is for step loop.
    Then have a look at steploop itselp, one entry of it will occupy two lines.
    (Be careful, for table control, the head and the bottom scroll bar will possess another two fixed lines, and there is a maximum number for table line)
    Now we have : FixedLine = 9
    LoopLine = 2(for table control, LoopLine is always equal to 1)
    Step2: go to transaction itself(ME21) to see how it roll page, in ME21, the first line of new page is always occupied by the last line of last page, so it begin with index '02', but in some other case, fisrt line is empty and ready for input.
    Now we have: FirstLine = 0
    or FirstLine = 1 ( in our case, FirstLine is 1 because the first line of new page is fulfilled)
    Step3: write a subroutine calcalculating number of pages
    (here, the name of actual parameter is the same as formal parameter)
    global data: FixedLine type i, " number of fixed line on a certain screen
    LoopLine type i, " the number of lines occupied by one steploop item
    FirstLine type i, " possbile value 0 or 1, 0 stand for the first line of new
    " scrolling screen is empty, otherwise is 1
    Dataline type i, " number of items you will use in BDC, using DESCRIBE to get
    pageno type i, " you need to scroll screen how many times.
    line type i, " number of lines appears on the screen.
    index(2) type N, " the screen index for certain item
    begin type i, " from parameter of loop
    end type i. " to parameter of loop
    *in code sample, the DataTable-linindex stands for the table index number of this line
    form calpage using FixedLine type i (see step 1)
    LoopLine type i (see step 1)
    FirstLine type i (see step 2)
    DataLine type i ( this is the item number you will enter in transaction)
    changing pageno type i (return the number of page, depends on run-time visible line in table control/ Step Loop)
    changing line type i.(visible lines one the screen)
    data: midd type i,
    vline type i, "visible lines
    if DataLine eq 0.
    Message eXXX.
    endif.
    vline = ( sy-srows - FixedLine ) div LoopLine.
    *for table control, you should compare vline with maximum line of
    *table control, then take the small one that is min(vline, maximum)
    *here only illustrate step loop
    if FirstLine eq 0.
    pageno = DataLine div vline.
    if pageno eq 0.
    pageno = pageno + 1.
    endif.
    elseif FirstLine eq 1.
    pageno = ( DataLine - 1 ) div ( vline - 1 ) + 1.
    midd = ( DataLine - 1 ) mod ( vline - 1).
    if midd = 0 and DataLine gt 1.
    pageno = pageno - 1.
    endif.
    endif.
    line = vline.
    endform.
    Step4 write a subroutine to calculate the line index for each item.
    form calindex using Line type i (visible lines on the screen)
    FirstLine type i(see step 2)
    LineIndex type i(item index)
    changing Index type n. (index on the screen)
    if FirstLine = 0.
    index = LineIndex mod Line.
    if index = '00'.
    index = Line.
    endif.
    elseif FirstLine = 1.
    index = LineIndex mod ( Line - 1 ).
    if ( index between 1 and 0 ) and LineIndex gt 1.
    index = index + Line - 1.
    endif.
    if Line = 2.
    index = index + Line - 1.
    endif.
    endif.
    endform.
    Step5 write a subroutine to calculate the loop range.
    form calrange using Line type i ( visible lines on the screen)
    DataLine type i
    FirstLine type i
    loopindex like sy-index
    changing begin type i
    end type i.
    If FirstLine = 0.
    if loopindex = 1.
    begin = 1.
    if DataLine <= Line.
    end = DataLine.
    else.
    end = Line.
    endif.
    elseif loopindex gt 1.
    begin = Line * ( loopindex - 1 ) + 1.
    end = Line * loopindex.
    if end gt DataLine.
    end = DataLine.
    endif.
    endif.
    elseif FirstLine = 1.
    if loopindex = 1.
    begin = 1.
    if DataLine <= Line.
    end = DataLine.
    else.
    end = Line.
    endif.
    elseif loop index gt 1.
    begin = ( Line - 1 ) * ( loopindex - 1 ) + 2.
    end = ( Line - 1 ) * ( loopindex - 1 ) + Line.
    if end gt DataLine.
    end = DataLine.
    endif.
    endif.
    endif.
    endform.
    Step6 using field sysbol in your BDC, for example: in ME21, but you should calculate each item will correponding to which index
    form creat_bdc.
    field-symbols: <material>, <quan>, <indicator>.
    data: name1(14) value 'EKPO-EMATN(XX)',
    name2(14) value 'EKPO-MENGE(XX)',
    name3(15) value 'RM06E-SELKZ(XX)'.
    assign: name1 to <material>,
    name2 to <quan>,
    name3 to <indicator>.
    do pageno times.
    if sy-index gt 1
    *insert scroll page ok_code"
    endif.
    perform calrange using Line DataLine FirstLine sy-index
    changing begin end.
    loop at DataTable from begin to end.
    perform calindex using Line FirstLine DataTable-LineIndex changing Index.
    name1+11(2) = Index.
    name2+11(2) = Index.
    name3+12(2) = Index.
    perform bdcfield using <material> DataTable-matnr.
    perform bdcfield using <quan> DataTable-menge.
    perform bdcfield using <indicator> DataTable-indicator.
    endloop.
    enddo.
    Sample code
    Following is a sample code of handling table control in BDC.
    REPORT Y730_BDC5 .
    *HANDLING TABLE CONTROL IN BDC
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
    DUMMY(100) TYPE C,
    END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
    LIFNR(10) TYPE C,
    BUKRS(4) TYPE C,
    EKORG(4) TYPE C,
    KTOKK(4) TYPE C,
    NAME1(30) TYPE C,
    SORTL(10) TYPE C,
    LAND1(3) TYPE C,
    SPRAS(2) TYPE C,
    AKONT(6) TYPE C,
    FDGRV(2) TYPE C,
    WAERS(3) TYPE C,
    END OF IT_XK01,
    BEGIN OF IT_BANK OCCURS 0,
    BANKS(3) TYPE C,
    BANKL(10) TYPE C,
    BANKN(10) TYPE C,
    KOINH(30) TYPE C,
    LIFNR(10) TYPE C,
    END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    FILENAME = 'C:\VENDOR.TXT'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = IT_DUMMY.
    LOOP AT IT_DUMMY.
    IF IT_DUMMY-DUMMY+0(2) = '11'.
    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
    APPEND IT_XK01.
    ELSE.
    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
    APPEND IT_BANK.
    ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro using 'SAPMF02K' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-REF_LIFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    IT_XK01-LIFNR.
    perform bdc_field using 'RF02K-BUKRS'
    IT_XK01-BUKRS.
    perform bdc_field using 'RF02K-EKORG'
    IT_XK01-EKORG.
    perform bdc_field using 'RF02K-KTOKK'
    IT_XK01-KTOKK.
    perform bdc_dynpro using 'SAPMF02K' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-TELX1'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFA1-NAME1'
    IT_XK01-NAME1.
    perform bdc_field using 'LFA1-SORTL'
    IT_XK01-SORTL.
    perform bdc_field using 'LFA1-LAND1'
    IT_XK01-LAND1.
    perform bdc_field using 'LFA1-SPRAS'
    IT_XK01-SPRAS.
    perform bdc_dynpro using 'SAPMF02K' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-KUNNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-KOINH(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    DATA : FNAM(20) TYPE C,
    IDX TYPE C.
    MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
    CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKS.
    CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKL.
    CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKN.
    CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-KOINH.
    IDX = IDX + 1.
    ENDLOOP.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPMF02K' '0210'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB1-FDGRV'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFB1-AKONT'
    IT_XK01-AKONT.
    perform bdc_field using 'LFB1-FDGRV'
    IT_XK01-FDGRV.
    perform bdc_dynpro using 'SAPMF02K' '0215'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB1-ZTERM'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0220'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB5-MAHNA'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0310'.
    perform bdc_field using 'BDC_CURSOR'
    'LFM1-WAERS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFM1-WAERS'
    IT_XK01-WAERS.
    perform bdc_dynpro using 'SAPMF02K' '0320'.
    perform bdc_field using 'BDC_CURSOR'
    'WYT3-PARVW(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
    MODE 'A'
    UPDATE 'S'
    MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-PROGRAM = PROG.
    IT_BDCDATA-DYNPRO = SCR.
    IT_BDCDATA-DYNBEGIN = 'X'.
    APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-FNAM = FNAM.
    IT_BDCDATA-FVAL = FVAL.
    APPEND IT_BDCDATA.
    ENDFORM.
    Reward if helpful

  • How to dynamically call image  in PDF for Acrobat ver 8.1 onwards?

    Hi Experts,
    I am using Web Dynpro Java. My requirement is to call the images dynamically on a PDF form. There are no of company code. I have to call different logos for different company codes/
    We are now using Acrobat 8.1.1. Please refer following thread.
    http://kb2.adobe.com/cps/405/kb405270.html
    From Acrobat 8.*, we have to use some different method for dynamically calling the images. Earlier we were using the concept mentioned below to dynamically call images.
    However this method is not applicable for Acrobat Reader 8.* onwards due to security reasons.
    Click on the Layout tab and choose None for the Caption position.
    u2022 Click on the Object, then the Binding tab and choose None for Default Binding.
    u2022 Click on the Field tab, enter $record.SapOnlineShopUrl for the URL entry, and select Use Image Size for the Sizing field.
    u2022 Click on the script editor and enter the following FormCalc script statement, which enables the dynamic integration of the image. Show: initialize Script: this.value.image.href = xfa.resolveNode(this.value.image.href).value; Language: FormCalc Run At: Client
    write following code in wddoinit
    try { String url = WDURLGenerator.getAbsoluteWebResourceURL( wdComponentAPI.getDeployableObjectPart(), "sap_online_shop.jpg"); wdContext.currentDataSourceElement().setSapOnlineShopUrl(url); } catch(Exception e) { throw new WDRuntimeException(e); }
    Please let me know what is the alternate method for Adope ver 8.1.1
    Regards,
    Gary

    Hi Gary,
    First you upload the image in SAP through se78.then write the below code in your adobe form interface.
    data :  v_object type  TDOBJECTGR value 'GRAPHICS',
            v_id  type TDIDGR  value 'BMAP',
            v_btype type TDBTYPE value 'BCOL',
            V_FIELD TYPE XSTRING.
    V_NAME = 'ZW_DEVMAN_LOGO'.
    CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    EXPORTING
    p_object = v_object " 'GRAPHICS'
    p_name = v_name " Name of the logo as in se78
    p_id = v_id " 'BMAP'
    p_btype = v_btype " 'BCOL' ( whether the image is in color or black and white )
    RECEIVING
    p_bmp = v_field
    EXCEPTIONS
    not_found = 1
    internal_error = 2
    OTHERS = 3.
    g_logo = v_field.
    Declare g_logo as xstring in global data.
    In context of the form make one graphic element with field g_logo and mime type BMP.It will work.
    Regards,
    Simi A M
    Edited by: amsimi on Jan 26, 2011 5:30 AM

  • Calling Oracle Stored proc with record type and table Type

    I have a oracle SP which takes record type and table Type which are used for order management.
    Is there anay way to populate parameters with these datatypes and call the stored procedure using ODP.NET?
    Please help.
    Thanks in advance

    Hi,
    ODP supports associative arrays and REF Cursors. There is no support for PLSQL table of records.
    Jenny

  • Dynamic binding for table column

    Hi,
    I am using standard application and in a table (not ALV) i want to chnage the name of a column. Already a OTR is placed in it so am planning to do a dynamic bind for the text in the header. Kindly suggest ways.
    Thanks,
    Koushik

    DATA:
            l_caption          TYPE string,
            l_title            TYPE string.
      data lr_caption type ref to cl_wd_caption.
    *---Get OTR Text for Value Description
      CALL METHOD cl_wd_utilities=>get_otr_text_by_alias
        EXPORTING
          alias      = 'ZPERF_MGMT_DEV/RATING'
      language   =
        RECEIVING
          alias_text = l_title.
    lr_caption ?= view->get_element( 'TBL_VAL_HELP_DESCRIPTION_HEADER' ).
    lr_caption->set_text( value = l_title ).

  • Transfering old data from a table to a history table for records purposes

    Hi,
    I need to write a program that automatically writes old records to another table before updating or deleting itself.
    Can this be automated to be done every 28th of every month.
    See my tables below:
    CREATE TABLE PAY(
    PAYMENTID NUMBER(8) NOT NULL,
    EMPID NUMBER NOT NULL,
    NAME VARCHAR(30) NOT NULL,
    MONTHLY_NORMALHRS NUMBER(2),
    OTHRS_FOR_MONTH NUMBER(2),
    MONTHLY_WAGES NUMBER(7,2),
    OTAMOUNT_FOR_MONTH NUMBER(7,2),
    --ALLOWANCES
    --DEDUCTIONS
    GROSS_MONTHLY NUMBER (7,2),
    MONTHLY_TAX NUMBER(7,2),
    MONTHLY_NET NUMBER(7,2),
    PAYMENTDATE DATE NOT NULL,
    CONSTRAINT PK_PAY PRIMARY KEY (PAYMENTID));
    INSERT INTO PAY VALUES(100,200,'JOHN BULL',140,20,'','','','','','28-MARCH-2006');
    UPDATE PAY SET MONTHLY_WAGES= ((35000.00/52)*4), OTAMOUNT_FOR_MONTH=(20*1.5), GROSS_MONTHLY=((35000.00/12)+(20*1.5)), MONTHLY_TAX=((35000.00/52)*4)+((20*1.5)*.20),MONTHLY_NET=(((35000.00/12)+(20*1.5)))-(((35000.00/52)*4)+((20*1.5)*.20)) WHERE PAYMENTID = 100;
    CREATE TABLE PAYMENT_HISTORY(
    PAYMENTID NUMBER(8),
    EMPID NUMBER NOT NULL,
    NAME VARCHAR(30) NOT NULL,
    MONTHLY_NORMALHRS NUMBER(2),
    OTHRS_FOR_MONTH NUMBER(2),--
    MONTHLY_WAGES NUMBER(7,2),-- ((CLASSIFICATION.YEARLY_PAY/52)*4) OR CLASSIFICATION.YEARLY_PAY/12
    OTAMOUNT_FOR_MONTH NUMBER(7,2),
    --ALLOWANCES
    --DEDUCTIONS
    GROSS_MONTHLY NUMBER (7,2),--(MONTHLY_WAGES +(MONTHLY_OTHRS*1.5))
    MONTHLY_TAX NUMBER(7,2),
    MONTHLY_NET NUMBER(7,2),
    PAYMENTDATE DATE NOT NULL,
    CONSTRAINT UQ_PAY_PAYM_HIST UNIQUE (PAYMENTID,PAYMENTDATE));
    Now I need to be able transfer the update record on table PAY to table PAYMENT_HISTORY on a regularly date say the 28th of every month.
    How do I do this, a trigger or a procedure or both?
    SOS
    Cube60

    Example ;-
    create table test67(no number(2) primary key, name varchar2(10));
    create table test67h(no number(2), name varchar2(10),flag char);
    create or replace trigger t67 before insert or update or delete on test67 for each row
    begin
    if inserting then
    insert into test67h values(:new.no,:new.name,'N');
    end if;
    if updating then
    insert into test67h values(:new.no,:new.name,'U');
    end if;
    if deleting then
    insert into test67h values(:old.no,:old.name,'D');
    end if;
    end;
    SQL> insert into test67 values(1,'Lijesh');
    1 row created.
    SQL> update test67 set name='Vishnu' where no=1;
    1 row updated.
    SQL> delete from test67;
    1 row deleted.
    SQL> select * from test67h;
    NO NAME F
    1 Lijesh N
    1 Vishnu U
    1 Vishnu D
    SQL> select * from test67;
    no rows selected

  • Change Request for records in table

    Dear all,
    I want to create a Change Request to include all the records in my Z table, by using the SM30,
    I don't want to change record by record, as the table includes hundreds of record.
    Could any body tell me?
    Best Regads,
    Jack

    Hi Jack,
    Including Table Entries in a Transport Request   
    Enter a transport request.
    Select the table entries you wish to transport.
    Assign the selected table entries to the transport request using the Include in request function.
    This marks the entries for inclusion in the transport request.
    Save your changes.
    The selected table entries are added to the transport request.
    You can display all table entries which are either marked for inclusion or already included in the transport request by choosing Choose ® All in request.
    You can display all table entries which are not included in the transport request by choosing Choose ® All not in request.
    Regards,
    Deepak Kori

  • How to check if internal table exists in dynamical called subroutine ?

    Hi,
    in a dynamically called subroutine i'm using a internal table, but in some calls this table is not exist.
    How can i check in the code whether the internal table exist or not ?
    regards,
    Hans

    In Horst Keller's blog /people/horst.keller/blog/2005/05/27/abap-geek-10--everything-functions-150-but-how my issue is talked about :
    All other parameters are handled in a way as they were declared as global data objects in the top include of the function group, that can be used only during the execution of the function module: They are visible throughout the function group but you can access them only while the function module is active. If you access such a parameter and the respective function module is not executed, you get the runtime error GETWA_NOT_ASSIGNED (Why? Well, technically thos guys are represented via field symbols which are valid only during the runtime of the function module).
    The code is in SD pricing. Sometimes the code is called from function module PRICING_BUILD_XKOMV or PRICING_SUBSCREEN_PBO where TKOMV is defined as globalized parameter.
    And sometimes it is called from function module PRCING_CHECK where TKOMV is NOT defined as parameter.
    In the call of last function the dump occures on the ASSIGN statement :
         data: ls_tkomv like line of tkomv,
                  lv_tablename(30) type c value 'TKOMV[]'.
        field-symbols: <lfs> type any table.
         assign (lv_tablename) to <lfs>.
         if <lfs> is assigned.
    Any suggestions to solve the issue ?
    regards,
    Hans

Maybe you are looking for

  • AirPort Extreme Connection Failed with Hard Disk EVERYDAY!

    This is getting really annoying now, I have currently three x 2TB hard drives plugged into the AirPort Extreme via a 4 Bay Enclosure. Everyday, now and then, the connection fails. Meaning it wont let me backup and says "Couldn't find disk". And nor c

  • Regarding  Dimension Table and Fact table

    Hello, I am having basic doubts regarding the star schema. Let me explain first regarding  star schema. Fact table containes Key fiigures and Dim IDs,Ok, These DIm ids will be connected to my dimension tables.The Dimension table contains Charactersti

  • How do I get skype working now that i've upgraded to Lion 8.2?

    Hello I need to help please! I just upgraded my system to Lion 8.2. When i tried to open Skype it crashed every time. so i uninstalled it and then reinstalled it and it keeps crashing every time.  Does anyone know how to fix this problem? I read some

  • Does iPhone Packager CS 5.5 support camera access and LOADING images from the camera roll?

    Flash CS 5 only supports SAVING to the camera roll, not loading image from it. And it has no access to the camera to take pictures and access the image within the app. Does Flash CS 5.5 do these things? There's no point in upgrading if it doesn't sup

  • Imovie not importing photos properly

    Imac running Snow Leopard, 4Gig RAM. Have started an event and dragged in some video scenes, now when I add photos from the iphoto gadget, the photos don't show up when I'm previewing the movie. Each time I drag a new photo onto the event list, the i