How to maintain the data  into database table

Hi,
experts,
how to maintain the data  into database table

There are several ways to maintain data in the database
1. Use table maintanance generator . You can create this using SE11 and data can be edited through SM30.
2. Loginto  SE11 with the specified table and check the ATTRIBUTES tab. There you can set some parameters for maintaining the database. When you set Maintain database, you edit the data thorugh SE11 it self
3. Through Se16 as well.
4. A small abap program can do the above task as well.
Thanks,
Raj
Edited by: Rajanya Kolavennu on Feb 5, 2008 8:33 PM

Similar Messages

  • How to updated the data into Database table

    Hi Guy's,
    Please help me Using Tabstrip control how to updated the related infotype records into related database table.
    Thanks and Regards,
    Sai.

    Hi Guy's,
    Please help me Using Tabstrip control how to updated the related infotype records into related database table.
    Thanks and Regards,
    Sai.

  • Parsing an EDI file and populating the data into database table

    Hi ,
    Please help me in parsing an edi file and getting the required columns.
    we get an EDI file from a bank. I need to parse that file and populate the db table with the required columns.
    the file is '*' delimited and every line ends with '\'.
    The record starts with 'ST*' and ends with 'SE*'.
    sample edi file is
    ISA*00*          *00*          *ZZ*043000096820   *ZZ*2156833510     *131202*0710*U*00401*000001204*0*P*>\  ignore first 2 lines                                                                                                                                                                                              
    GS*RA*043000096820*2156833510*131202*0710*1204*X*003020\                                                                                                                                                                                                                                                  
    ST*820*000041031\                                                                                                                                                                                                                                                                                     
    BPR*X*270*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\                                                                                                                                                                                                                  
    TRN*1*101036661273032\                                                                                                                                                                                                                                                                                    
    DTM*007*131202\                                                                                                                                                                                                                                                                                           
    N1*1U*BPS\                                                                                                                                                                                                                                                                             
    N1*BE*MICHAEL    DRAYTON*34*159783633\                                                                                                                                                                                                                                                                    
    N1*PE*BPS*ZZ*183383689C2 ABC\                                                                                                                                                                                                                                                          
    N1*PR*ABC  TREAS 310\                                                                                                                                                                                                                                                                                     
    SE*9*000041031\ ST*820*000041032\                                                                                                                                                                                                                                                                                         
    BPR*X*686*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\                                                                                                                                                                                                                  
    TRN*1*101036661273034\                                                                                                                                                                                                                                                                                    
    DTM*007*131202\                                                                                                                                                                                                                                                                                           
    N1*1U*BPS\                                                                                                                                                                                                                                                                             
    N1*BE*SAMIA      GRAVES*34*892909238\                                                                                                                                                                                                                                                                     
    N1*PE*BPS*ZZ*184545710C5 ABC\                                                                                                                                                                                                                                                          
    N1*PR*ABC  TREAS 310\                                                                                                                                                                                                                                                                                     
    SE*9*000041032\
    Below is the procedure I am trying to use for parsing that file. but the logic is not working. can you please help me in doing this. its very urgent requirement.
    CREATE OR REPLACE package body p1 is
    Function parse_spec(p_str varchar2) return t_str_nt is
    begin
          return regexp_replace(p_str,'\\$',null);
    end;
    procedure edi( is
    l_out_file              utl_file.file_type;
    l_lin                 varchar2(200);
    field1            number(9);
    field2                varchar2(10 byte);
    field3           varchar2(15 byte);
    field4               varchar2(15 byte);
    field5              varchar2(20 byte);
    field6             varchar2(20 byte);
    field7              varchar2(20 byte);
    field8                  varchar2(9 byte);
    field9              varchar2(15 byte);
    field10             varchar2(5 byte);
    l_item_nt             t_str_nt:=t_str_nt();
    begin
       l_out_file  := utl_file.fopen (file_path, file_name, 'r');
       IF utl_file.is_open(l_out_file) THEN
        LOOP
          BEGIN
           l_item_nt:= utl_file.get_line(l_out_file, l_lin);
            IF l_item_nt IS NULL THEN
              raise no_data_found;
            Else
              for k in 1..l_item_nt.count loop
                  case
                   when l_item_nt(k) like 'ST*%' then
                           field1:= ltrim(regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3),0);
                   when l_item_nt(k) like 'BPR*X*%' then
                           field2 := regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3);
                    when l_item_nt(k) like 'TRN*1*%' then
                             field3:= regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3);
                    when l_item_nt(k) like 'DTM*007*%' then
                            field4:= regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3);
                    when l_item_nt(k) like '%*BE*%' then
                            field5 := regexp_substr(regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3),'[^ ]+', 1, 1);
                            field6 := regexp_substr(regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,3),'[^ ]+', 1, 1);
                             field7  := regexp_substr(parse_spec(l_item_nt(k)),'[^*]+',1,5);
                    when l_item_nt(k) like '%*PE*%*ZZ*%' then
                            field8:= regexp_substr(regexp_substr(parse_spec(line),'[^*]+',1,5),'[^ ]+',1,1)
                            field9 := regexp_substr(regexp_substr(parse_spec(line),'[^*]+',1,5),'[^ ]+',1,2);
                     when l_item_nt(k) like 'SE*%' then
                                                         insert into t1(field1,field2,field3,field5,field6,field7,field8,field9)
                                --  values(field1,field2,field3,field5,field6,field7,field8,field9);
                     else
                            dbms_output.put_line ('end of line');
                         end case;
                end loop;
            end if;
    end loop;
                         utl_file.fclose(l_out_file);
    exception
       when no_data_found then
                   dbms_output.put_line('No data found');
       end;

    I would not use regular expressions for parsing as it is CPU intensive - and standard string processing suffices.
    I would break the EDI up into lines. I would tokenise each line. I then have 2d array that can be referenced to find a specific field. E.g. line x and token y is field abc.
    Basic approach:
    SQL> create or replace type TStrings as table of varchar2(4000);
      2  /
    Type created.
    SQL> -- create a parser that tokenises a string
    SQL> create or replace function Tokenise(
      2          csvLine varchar2,
      3          separator varchar2 default ',',
      4          enclosedBy varchar2 default null
      5  ) return TStrings is
      6          strList         TStrings;
      7          str             varchar2(32767);
      8          i               integer;
      9          l               integer;
    10          enclose1        integer;
    11          enclose2        integer;
    12          encloseStr      varchar2(4000);
    13          replaceStr      varchar2(4000);
    14
    15          procedure AddString( line varchar2 ) is
    16          begin
    17                  strList.Extend(1);
    18                  strList( strList.Count ) := Replace( line, CHR(0), separator );
    19          end;
    20
    21  begin
    22          strList := new TStrings();
    23
    24          str := csvLine;
    25          loop
    26                  if enclosedBy is not null then
    27                          -- find the ennclosed text, if any
    28                          enclose1 := InStr( str, enclosedBy, 1 );
    29                          enclose2 := InStr( str, enclosedBy, 2 );
    30
    31                          if (enclose1 > 0) and (enclose2 > 0) and (enclose2 > enclose1) then
    32                                  -- extract the enclosed string
    33                                  encloseStr := SubStr( str, enclose1, enclose2-enclose1+1 );
    34                                  -- replace the separator char's with zero char's
    35                                  replaceStr := Replace( encloseStr, separator, CHR(0) );
    36                                  -- and remove the enclosed quotes
    37                                  replaceStr := Replace( replaceStr, enclosedBy );
    38                                  -- change the enclosed string in the big string to the replacement string
    39                                  str := Replace( str, encloseStr, replaceStr );
    40                          end if;
    41                  end if;
    42
    43                  l := Length( str );
    44                  i := InStr( str, separator );
    45
    46                  if i = 0 then
    47                          AddString( str );
    48                  else
    49                          AddString( SubStr( str, 1, i-1 ) );
    50                          str := SubStr( str, i+1 );
    51                  end if;
    52
    53                  -- if the separator was on the last char of the line, there is
    54                  -- a trailing null column which we need to add manually
    55                  if i = l then
    56                          AddString( null );
    57                  end if;
    58
    59                  exit when str is NULL;
    60                  exit when i = 0;
    61          end loop;
    62
    63          return( strList );
    64  end;
    65  /
    Function created.
    SQL>
    SQL>
    SQL> declare
      2          ediDoc  varchar2(32767) :=
      3  'ISA*00*          *00*          *ZZ*043000096820   *ZZ*2156833510     *131202*0710*U*00401*000001204*0*P*>\GS*RA*043000096820*2156833510*131202*0710*1204*X*003020\ST*820*000041031\BPR*X*270*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\TRN*1*101036661273032\DTM*007*131202\N1*1U*BPS\N1*BE*MICHAEL      DRAYTON*34*159783633\N1*PE*BPS*ZZ*183383689C2 ABC\N1*PR*ABC  TREAS 310\SE*9*000041031\ST*820*000041032\BPR*X*686*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202\TRN*1*101036661273034\DTM*007*131202\N1*1U*BPS\N1*BE*SAMIA        GRAVES*34*892909238\N1*PE*BPS*ZZ*184545710C5 ABC\N1*PR*ABC  TREAS 310\SE*9*000041032\';
      4
      5          lines   TStrings;
      6          tokens  TStrings;
      7  begin
      8          -- split EDI string into lines
      9          lines := Tokenise( ediDoc, '\' );
    10
    11          -- process line and extract fields
    12          for i in 3..lines.Count loop
    13                  dbms_output.put_line( '***********************' ) ;
    14                  dbms_output.put_line( 'line=['||lines(i)||']' );
    15                  tokens := Tokenise( lines(i), '*' );
    16
    17                  for j in 1..tokens.Count loop
    18                          dbms_output.put_line( to_char(j,'00')||'='||tokens(j) );
    19                  end loop;
    20          end loop;
    21  end;
    22  /
    line=[ST*820*000041031]
    01=ST
    02=820
    03=000041031
    line=[BPR*X*270*C*ACH*PPD*01*101036669***9101036669**01*031000053*DA*00000008606086714*131202]
    01=BPR
    02=X
    03=270
    04=C
    05=ACH
    06=PPD
    07=01
    08=101036669
    09=
    10=
    11=9101036669
    12=
    13=01
    14=031000053
    15=DA
    16=00000008606086714
    17=131202
    line=[TRN*1*101036661273032]
    01=TRN
    02=1
    03=101036661273032
    <snipped>

  • How to retrieve the data from database table to the screens

    Hi all,
    I have created a transaction to save the costing details..but if the material code already exists then it should get the header and details of that material code onto the table cotrol of the screen..i'm getiing them into my itab but only the last record of that is visible for n times as there are n records...can anyone help me in this?

    Dear anil ,
      Please give condtion in u r code on line item wise so its taking all records correctly.
    Regards ,
    Nikhil narkhede.

  • Its very urgent:how to insert data into database tables

    Hi All,
    I am very new to oaf.
    I have one requirement data insert into database tables.
    here createPG having data that data insert into one custom table.
    but i dont know how to insert data into database tables.
    i wrote the code in am,co as follows.
    in am i wrote the code:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in createPG processrequest co:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.NewoperationManagerLogic();
    process form request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    please help with an example(sample code).
    its very urgent.
    thanks in advance
    Seshu
    Edited by: its urgent on Dec 25, 2011 9:31 PM

    Hi ,
    1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
    2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
    3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
    You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
    Thanks
    Pratap

  • How to write a procedure to load the data into a table using xml file as input to the procedure?

    Hi,
    Iam new to the xml,
    can u please anyone help me how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me.
    <?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>.
    Regards,
    vikram.

    here is the your XML parse in 11g :
    select *
      from xmltable('//Entity' passing xmltype
    '<?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>
    ') columns
      "dcode" varchar2(4000) path '/Entity/dcode',
      "ddesc" varchar2(4000) path '/Entity/ddesc',
      "reauthflag" varchar2(4000) path '/Entity/reauthflag'
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    Using this parser you can create procedure as
    SQL> create or replace procedure myXMLParse(x clob) as
      2  begin
      3    insert into MyXmlTable
      4      select *
      5        from xmltable('//Entity' passing xmltype(x) columns "dcode"
      6                      varchar2(4000) path '/Entity/dcode',
      7                      "ddesc" varchar2(4000) path '/Entity/ddesc',
      8                      "reauthflag" varchar2(4000) path '/Entity/reauthflag');
      9    commit;
    10  end;
    11 
    12  /
    Procedure created
    SQL>
    SQL>
    SQL> exec myXMLParse('<?xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>');
    PL/SQL procedure successfully completed
    SQL> select * from MYXMLTABLE;
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    SQL>
    Ramin Hashimzade

  • I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?

    I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?

    You only need the ODBC driver on each computer. If you are distributing the SQL Toolkit app as an executable and do not install the whole toolkit on each computer, you'll need the SQL Toolkit support files. This is about a dozen files. You can get the list at http://digital.ni.com/public.nsf/websearch/b814be005f9da9258625658700550c75?OpenDocument.

  • How to delete the data from partition table

    Hi all,
    Am very new to partition concepts in oracle..
    here my question is how to delete the data from partition table.
    is the below query will work ?
    delete from table1 partition (P_2008_1212)
    we have define range partition ...
    or help me how to delete the data from partition table.
    Thanks
    Sree

    874823 wrote:
    delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
    Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
    How the table implements its structure is a physical design consideration.
    Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
    When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
    And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
    Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
    This is a crucial concept to understand and get right.

  • Insert the data into two tables at a time.

    Hi ,
    i have these two tables
    create table [dbo].[test1](
    [test1_id] [int] identity(1,1) primary key,
    [test2_id] [int] not null
    create table [dbo].[test2](
    [test2_id] [int] identity(1,1) primary key,
    [test1_id] [int] not null
    alter table [dbo].[test1]
    add constraint [fk_test1_test2_id] foreign key([test2_id])
    references [dbo].[test2] ([test2_id])
    alter table [dbo].[test2] add constraint [fk_test2_test2_id] foreign key([test1_id])
    references [dbo].[test1] ([test1_id])
    I want to insert the data into two tables in one insert statement. How can i do this using T-SQL ?
    Thanks in advance.

    You can INSERT into both tables within one Transaction but not in one statement. By the way, you would need to alter your dbo.Test1 table to allow null for first INSERT test2_id column
    See sample code below:
    CREATE TABLE #test1(test1_ID INT IDENTITY(1,1),test2_id INT NULL)
    CREATE TABLE #test2(test2_ID INT IDENTITY(1,1),test1_ID INT)
    DECLARE @Test1dentity INT
    DECLARE @Test2dentity INT
    BEGIN TRAN
    -- Insert NULL as test2_ID value is unknown
    INSERT INTO #test1(test2_ID)
    SELECT NULL;
    -- get inserted identity value
    SET @Test1dentity = SCOPE_IDENTITY();
    INSERT INTO #test2(test1_ID)
    SELECT @Test1dentity;
    -- get inserted identity value
    SET @Test2dentity = SCOPE_IDENTITY();
    -- Update test1 table
    UPDATE #test1
    SET test2_ID = @Test2dentity
    WHERE test1_ID = @Test1dentity;
    COMMIT
    SELECT * FROM #test1;
    SELECT * FROM #test2;
    -- Drop temp tables
    IF OBJECT_ID('tempdb..#test1') IS NOT NULL
    BEGIN
    DROP TABLE #test1
    END
    IF OBJECT_ID('tempdb..#test2') IS NOT NULL
    BEGIN
    DROP TABLE #test2
    END
    web: www.ronnierahman.com

  • How to pull the data into smartform after designing layout?

    how to pull the data into smartform after designing layout?

    call the smartform in your Driver program and pass your output internal tables in the smartforms paramaters
    Check the below Sample code.
    FORM label_print.
      DATA : g_fm_name TYPE rs38l_fnam,
             g_output  TYPE ssfcompop,
             g_control TYPE ssfctrlop,
             g_form TYPE tdsfname VALUE 'ZPRINT_LABELS',
             g_dest TYPE rspopname,
             g_printer TYPE rspoptype..
      REFRESH : i_out[],i_qals[].
      SELECT matnr maktx
             INTO TABLE i_out
             FROM makt
             FOR ALL ENTRIES IN i_mseg
             WHERE matnr = i_mseg-matnr
             AND   spras = sy-langu.
      SELECT prueflos objnr ersteldat erstelzeit matnr revlv charg mengeneinh
             INTO TABLE i_qals
             FROM qals
             FOR ALL ENTRIES IN i_mseg
             WHERE matnr = i_mseg-matnr
             AND   charg = i_mseg-charg.
    *FM to accept the device type and returns the short name of the output device
      CALL FUNCTION 'EFG_GET_PRINTER'
        EXPORTING
          x_no_dialog  = ' '
          x_obligatory = 'X'
        IMPORTING
          y_tddest     = g_dest
        EXCEPTIONS
          cancelled    = 1
          failed       = 2
          OTHERS       = 3.
    *device type name for the output device
      SELECT SINGLE patype                                  "#EC CI_NOFIELD
             FROM tsp03d
             INTO g_printer
             WHERE padest = g_dest.
    *printer setting
      g_control-no_dialog = 'X'.
      g_output-tdarmod = '1'.
      g_output-tdcopies = '001'.
      g_output-tddest = g_dest.
      g_output-tdprinter = g_printer.
      g_output-tdnewid = 'X'.
      g_output-tdimmed = 'X'.
      CLEAR wa_mseg.
      LOOP AT i_mseg INTO wa_mseg.
        READ TABLE i_out INTO wa_out WITH KEY matnr = wa_mseg-matnr.
    check for the status and filter the records
        CLEAR : wa_qals.
        LOOP AT i_qals INTO wa_qals WHERE matnr = wa_mseg-matnr
                                    AND charg = wa_mseg-charg.
          CALL FUNCTION 'STATUS_TEXT_EDIT'
            EXPORTING
              objnr            = wa_qals-objnr
              spras            = sy-langu
            IMPORTING
              line             = l_status
            EXCEPTIONS
              object_not_found = 1
              OTHERS           = 2.
          IF l_status CS 'LTCA' OR l_status CS 'SKIP'.
            DELETE i_qals.
          ENDIF.
        ENDLOOP.
        SORT i_qals BY ersteldat DESCENDING erstelzeit DESCENDING.
        IF i_qals IS INITIAL.
          l_msg = text-002.
        ELSE.
          READ TABLE i_qals INTO wa_qals INDEX 1.
          SELECT prueflos vbewertung
                 INTO TABLE i_qave
                 FROM qave
                 WHERE prueflos = wa_qals-prueflos
                 AND   kzart = 'L'.
          IF sy-subrc <> 0.
            l_msg1 = text-003.
          ENDIF.
          SORT i_qave.
          CLEAR : wa_qave.
          IF NOT i_qave IS INITIAL.
            READ TABLE i_qave INTO wa_qave INDEX 1.
            IF wa_qave-vbewertung = 'A'.
              l_msg = text-002.
            ELSEIF wa_qave-vbewertung = 'R'.
              l_msg1 = text-003.
            ELSE.
              l_msg1 = text-003.
            ENDIF.
          ENDIF.
        ENDIF.
        CLEAR : wa_ser03.
        READ TABLE i_ser03 INTO wa_ser03 WITH KEY mblnr = wa_mseg-mblnr.
    *Calling Smartform
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = g_form
          IMPORTING
            fm_name            = g_fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        LOOP AT i_objk INTO wa_objk WHERE obknr = wa_ser03-obknr.
    *Calling FM generated from the smartform
          DATA : l_date(10) TYPE c,
                 l_date1(10) TYPE c,
                 l_date2(10) TYPE c,
                 l_date3(10) TYPE c,
                 l_hyphen(1) TYPE c VALUE '-'.
          CLEAR : l_date,l_date1,l_date2,l_date3.
          l_date1 = wa_mseg-vfdat+0(4).
          l_date2 = wa_mseg-vfdat+4(2).
          l_date3 = wa_mseg-vfdat+6(2).
          CONCATENATE l_date1 l_hyphen l_date2 l_hyphen l_date3 INTO l_date.
          CALL FUNCTION g_fm_name
            EXPORTING
              control_parameters = g_control
              output_options     = g_output
              user_settings      = ' '
              g_matnr            = wa_mseg-matnr
              g_mat_text         = wa_out-maktx
              g_batch            = wa_mseg-charg
              g_rev              = wa_qals-revlv
              g_edate            = l_date
              g_lot              = wa_qals-prueflos
              g_qty              = wa_mseg-erfmg
              g_uom              = wa_mseg-erfme
              g_serial           = wa_objk-sernr
              g_smsg             = l_msg
              g_fmsg             = l_msg1
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
          CLEAR  g_output-tdnewid.
        ENDLOOP.
        IF sy-subrc <> 0.
          CLEAR : l_date,l_date1,l_date2,l_date3.
          l_date1 = wa_mseg-vfdat+0(4).
          l_date2 = wa_mseg-vfdat+4(2).
          l_date3 = wa_mseg-vfdat+6(2).
          CONCATENATE l_date1 l_hyphen l_date2 l_hyphen l_date3 INTO l_date.
          CALL FUNCTION g_fm_name
            EXPORTING
              control_parameters = g_control
              output_options     = g_output
              user_settings      = ' '
              g_matnr            = wa_mseg-matnr
              g_mat_text         = wa_out-maktx
              g_batch            = wa_mseg-charg
              g_rev              = wa_qals-revlv
              g_edate            = l_date
              g_lot              = wa_qals-prueflos
              g_qty              = wa_mseg-erfmg
              g_uom              = wa_mseg-erfme
              g_serial           = wa_objk-sernr
              g_smsg             = l_msg
              g_fmsg             = l_msg1
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
          CLEAR g_output-tdnewid.
        ENDIF.
      ENDLOOP.
      IF sy-subrc = 0.
        MESSAGE i000(zm).
      ENDIF.
    ENDFORM.                    " label_print

  • How to insert  Legacy data into QP_RLTD_MODIFIERS table?

    How to insert  Legacy data into QP_RLTD_MODIFIERS table in R12 instance.

    I would use the API QP_Modifiers_PUB.Process_Modifiers for pushing legacy pricing data into R12.  QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environnment, only promos have data in this table).

  • How to import legacy data into apex tables

    Hi All,
    Please tell me How to import legacy data into apex tables.
    Thanks&Regards,
    Raghu

    SQL WorkshopUtilitiesData Workshop...
    you can import the data from already exported as (text/csv/xml) data
    Note: the table name and column name should be equal if the table already Existing table.

  • How to store an image into database table

    Hi
    Can anyone tell me the way, how to store an image into database table.

    Hello,
    May be this thread will help you in your requirement.
    [FM for uploading Image to SAP;
    Thanks,
    Jayant

  • How to get the data from Pooled Table T157E.

    Hi Experts,
    How to get the data from Pooled Table T157E.
    Any help.
    Thanks in Advance,
    Ur's Harsha.

    create some internal table similar to T157E and pass all data as per SPRAS.
    After that use internal table in your program as per the requirement.
    Regds,
    Anil

  • How to hide the data in particular table in oracle 10g

    How to hide the data in particular table in oracle 10g
    i want steps

    If its on Report u can  always hide the column - Keyfigure or Selection - Display - Hide......y do u want to have it on the report if it is to be hided in the first place?

Maybe you are looking for