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.

Similar Messages

  • 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

  • How to update the data in sqlserver table using procedure in biztalkserver

    Hi,
    Please can any one answer this below question
    how to update the data in sqlserver table using procedure in biztalkserver
    while am using executescalar,typedprocedure getting some warning
    Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
    Please send me asap....
    Thanks...

    Hi Messip,
    A detailed error would have helped us to answer you more appropriately but
    You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
    http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    2013: Inserting RawXML (Whole Incoming XML Message) in SQL database

  • How to update the data  in database in webdynpro

    I have to update the data in databse table using adaptive rfc in WebDynPro

    Hi,
    You can refer to these links:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
    Update data into SAP Table
    http://help.sap.com/saphelp_nw70/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/d5/1558bfa6aa80499113983e738b1b21/frameset.htm
    Regards
    Inder

  • 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 update the data  the transparent table CKMLMV013 ?

    How to update the data  the transparent table CKMLMV013 ?
    can you please replay asap.
    thanks,
    samba

    Hi,
    if you do a "where used" search of the table CKMLMV013 you will see that it is updated in several places:
    e.g. fm CKML_ORDER_CONNECTION_UPDATE
    Have a look at those places where the table is updated.
    Best regards.

  • 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 update the ztable by using table handling function

    how to update the ztable by using table handling function
    It is very urgent ...............................
    thanks in advance

    see the  below code for the direct   ztable update
    Report  ZUPDATE_PRPS.
    tables: zprps.
    parameter: p_wbs like zprps-pspnr,
               p_value like zprps-fakkz default 'X'.
    data: wa_fakkz type zprps-fakkz.
    *START-OF_SELECTION
    start-of-selection.
    call function 'CONVERSION_EXIT_ABPSP_INPUT'
         exporting
             input     = p_wbs
        importing
             output    = p_wbs
        exceptions
             not_found = 1
             others    = 2.
    select single fakkz
      into wa_fakkz
      from zprps
    where pspnr eq p_wbs.
    if sy-subrc eq 0.
       update zprps set fakkz = p_value where PSPNR eq p_wbs.
       if p_value is initial.
         message i999(za) with 'Billing element field has been unchecked'.
       else.
         message i999(za) with 'Billing element field has been checked'.
       endif.
    else.
      message i999(za) with 'WBS element not found'.
    endif.
    reward  points if it is usefull .....
    Girish

  • How to Update the data in R/3 From BW

    Hi All ,
         I Need some suggestion . i want to update the data of MARC table in R/3 from BW . Here data goes from BW to R/3 . so How to do this ? . There are no standard BAPI's in BW for this .
    Thanks
    Prithvi.

    Hi,
    The scenario you are explaining is little opposite to what happens generally. Are you sure, you want to update R/3 from BW?
    If you have to update MARC table that means you have to extend the material for different plants. Try using BAPI_MATERIAL_SAVE_DATA.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • How to update the field ZLSPR of table BSEG

    HI Friends,
    Can anyone tell me how to update the field ZLSPR of table BSEG? I've a 700 line abap program and I should include some logic in this program to make an entry into BSEG-ZLSPR. Is there any FM/BAPI available? Is BDC a healthy approach?. My team lead do not want me to use UPDATE statement....please help.
    Thanks in advans,
    Varsha.

    Hi,
    Hi ,
    You will need to group that radiobuttons so that SAP knows they are linked together. To do this using the grahical layout editor simply select all the radiobuttons and then right click on them, Now choose define group. Once you have done this you should not need any of the "clear" or "='X'" statements SAP should control it all for you.
    hope this helps
    Reward if found helpfull...
    Venkoji Babu.

  • 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

Maybe you are looking for

  • Multiple adapters for the same applications

    Hello. We are developing an integration scenario in which we have multiple instances of the same application (96 instances). We want to integrate them but deploying 96 adapters in Istudio is hard to maintain and useless because all the adapters do th

  • IPhoto just destroyed my pictures.

    I feel sick. My workflow: Import pics from camera using Image Capture. Browse. Use iPhoto with "Copy Items to the iPhoto Library" unchecked just for red-eye correction, enhancement, etc, then export back to original folder so I can archive the correc

  • Installation error code 11 Weblogic 7 in SUSE 7.2

    I downloaded at least two times weblogic server 7.0 SP2. The bin file is executed but abort with font error's. I tried console installation but installation aborted with error code 11 Help...give me a solution!!!!

  • Remote database????

    Hihi.. I need to do my application in a way that... the database will be in a remote location (server side) and can be accessed by users from other locations. For example, a user wants to login to the application and to check if he has entered the co

  • Writing file scenario problem on XI / PI

    Hello folks, I have a regression on a simple XI scenario : File => XI => File (asynchronous). It worked well last week but it doesnu2019t since monday : my return file isn't create on the shared directory (I re-check the target path and the directory