How to get amf headers?

Hi
I have set up communication between Actionscript and .NET WCF using amf. And the communication has worked fine using NetConnection. I have sent and recevied data in both directions. And sending headers from actionscript is no problem but when i send headers from WCF to actionscript I cant find a way to extract/find the header.
I have monitored the call using charles and there I can se that the header is sent back with the call from WCF.
I found this in the AMF specification, but how do i do it?
To handle an AMF context header a suitable method needs to be available, matching the header name. NetConnection is now a sealed type so either it must be subclassed or an object with a suitable implementation needs to be set for the NetConnection client property.
Thanks in advance

I solved it at posting my findings here.
To get the header I had to send in a Object to the client parameter on NetConnection like the code below:
public class UsingNetConnectionWithHeader
     public function UsingNetConnectionWithHeader
          netCon = new NetConnection();
          netCon.addEventListener(NetStatusEvent.NET_STATUS, connectionHandler);
          netCon.connect(remotingGateway);
          netCon.client = new CustomClient();
          netCon.call("Method", new Responder(successfulResult, erroneousResult),param1,param2...);
     public function connectionHandler(ev:NetStatusEvent):void
          if(ev.info.code == "NetConnection.Call.Failed")
               trace("Call failed");
     public function successfulResult(obj:Object):void
          trace("Call Successful");
     function erroneousResult(obj:Object):void
         trace("Call Failed");
public class CustomClient
     public function CustomHeader(content:String):void
          trace("Got header with content:" + content);    
To get this to work the custom header name must be CustomHeader.

Similar Messages

  • How to get table headers in jsp page

    hi,
    this is praveen, can any one help me to solve this problem.
    how to get table headers in a jsp page. whether it is possible using javascript or is there any other way.
    pls send rep.
    thank u.

    Hai ,
    I Think  This will help ful for u check it ,
    File=new FileLog("f:/WebServiceTrace/trace2.%g.log", 800000, 10,                                        new  TraceFormatter());
    The above code specifies the path for your log file.
    Then add this file as a log location and then log the traces. For this you can use the following code like:
    Location location=Location.getLocation(className);
              location.addLog(file);
              location.setEffectiveSeverity(Severity.ALL);
              location.entering(methodName);
    To Create j2ee apllication
    In path new-j2ee-jsp to create JSP's can only be used for J2EE applications.
    So as you are using this in Portal Application, this does not work.
    You can test this bahavior by creating a new Web Application (New-Project-J2EE-Web Module Project)
    In this Web Module Project, try creating JSP, this will work.
    So dont use new-j2ee-jsp to create JSP in Portal Application instead use New-File and name the file as jsp.
    Regards ,
    venkat

  • How to get HTTP headers from Data Provider Class?

    Hi,
    I'm the beginner in SAP NetWeaver Gateway. Using Service Builder I created CRUD OData web service and implemented CRUD operations in Data Provider Class. Data Provider Class has methods like MYENTITY_GET_ENTITYSET, MYENTITY_GET_ENTITY, MYENTITY_CREATE_ENTITY, MYENTITY_UPDATE_ENTITY. How can I get HTTP headers from the methods of this Data Provider Class?

    You can do so by using the following code in DPC
    Data :  Lo_facade type ref to /IWBEP/IF_MGW_DP_INT_FACADE.
    lo_facade     ?= /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
    lt_client_headers = lo_facade->get_request_header( ).
    Regards,
    Atanu

  • How to get Network headers from Project definition in PS module?

    Hi All,
    I want to get all network headers under a project definition. Please let me know how to get them?
    Do we have any BAPI for that?

    Check these BAPi's
    BAPI_PROJECTDEF_GETDETAIL
    BAPI_NETWORK_GETDETAIL

  • How to get linux-headers-3.6.4-1

    Hi forums,
    I have a new Arch install on an Asus G75VW that uses the x86_64 3.6.4-1 kernel. I've installed VMware Workstation by following the wiki, but when I run it it complains it can't find the kernel's C headers. I downloaded the "linux-headers" package but VMware Workstation doesn't accept it, which I assume is because the package gets "linux-headers-3.6.5-1" and VMware wants "linux-headers-3.6.4-1". Is this a correct assumption? What should my next step be?
    Thank you.

    Raynman wrote:The next step should be to update the rest of your system, in particular the kernel package, so that the versions match.
    Ok, thank you. I will review the wiki and do this.
    Raynman wrote:That is why people say you should always update before installing new software.
    I'm coming from Debian and the Arch Linux way of doing things is a bit different than what I'm used to. My first thought was I'd be able to download "linux-headers-3.6.4-1" through a package cache, but I haven't been able to find such a thing. Is the "linux-headers-3.6.4-1" package available at all, in an FTP or something?

  • Mail: How To Get Mail Headers To Show "Read"

    How can I get the mail headers to "gray" out or be colored when they've been read? Right now, ALL messages in the list are bold black. Once I read an email, it still shows bold and black. I need some sort of identification to show what is NEW and what HAS BEEN READ.
    I've been using Outlook, which grays out read messages.
    Any help would be appreciated. Thanks in advance.
    Dave

    Check the box at:
    Mail > Preferences > Viewing | Display Unread Messages with bold font

  • How to get  documentation of a report with its respective headers?

    I know fm, SRTU1_GET_REPORT_DOCUMENTATION, has to be used to get the documentation of a report. But when i print out the result it only shows the documentation data and not the data's respective headers. Without the headers the data looses its meaning.
    Any idea on how to get both the report documentation and its respective headers.
    Any help will be appreciated.
    Thanks
    Nahman

    The following code downloads program docu as pdf file:
    data: header like thead,
          options like itcpo.
    data: lines like tline occurs 0 with header line,
           otfdata like  itcoo occurs 0 with header line,
           pdflines like tline occurs 0 with header line,
           docstab like  docs occurs 0 with header line,
           binfilesize type i,
           filenm type string.
    parameters: program like trdir-name obligatory,
                filenam like rlgrap-filename default 'c:temppdftest.pdf'.
    start-of-selection.
      call function 'DOC_OBJECT_GET'
        exporting
          class                  = 'RE'
          name                   = program
         language               = sy-langu
          short_text             = 'X'
          appendix               = 'X'
       importing
         header                 = header
        tables
    *   RTF_LINES              =
          itf_lines              = lines
       exceptions
         object_not_found       = 1
         others                 = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      options-tdgetotf = 'X'.
      options-tdprogram = 'SAPLSHL2'.
      options-TDDEST = 'LOCL'.
      call function 'PRINT_TEXT'
        exporting
          application                    = 'TD'
    *   ARCHIVE_INDEX                  = ' '
    *   ARCHIVE_PARAMS                 = ' '
          device                         = 'PRINTER'
          dialog                         = ' '
          header                         = header
          options                        = options
    * IMPORTING
    *   NEW_ARCHIVE_PARAMS             =
    *   RESULT                         =
        tables
          lines                          = lines
          otfdata                        = otfdata
       exceptions
         canceled                       = 1
         device                         = 2
         form                           = 3
         options                        = 4
         unclosed                       = 5
         unknown                        = 6
         format                         = 7
         textformat                     = 8
         communication                  = 9
         bad_pageformat_for_print       = 10
         others                         = 11
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      refresh lines.
      call function 'CONVERT_OTF_2_PDF'
    * EXPORTING
    *   USE_OTF_MC_CMD               = 'X'
    *   ARCHIVE_INDEX                =
       importing
         bin_filesize                 = binfilesize
        tables
          otf                          = otfdata
          doctab_archive               = docstab
          lines                        = pdflines
       exceptions
         err_conv_not_possible        = 1
         err_otf_mc_noendmarker       = 2
         others                       = 3
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      filenm = filenam.
      call function 'GUI_DOWNLOAD'
        exporting
    *   BIN_FILESIZE                    =
          filename                        = filenm
          filetype                        = 'BIN'
        tables
          data_tab                        = pdflines
    *   FIELDNAMES                      =
       exceptions
         file_write_error                = 1
         no_batch                        = 2
         gui_refuse_filetransfer         = 3
         invalid_type                    = 4
         no_authority                    = 5
         unknown_error                   = 6
         header_not_allowed              = 7
         separator_not_allowed           = 8
         filesize_not_allowed            = 9
         header_too_long                 = 10
         dp_error_create                 = 11
         dp_error_send                   = 12
         dp_error_write                  = 13
         unknown_dp_error                = 14
         access_denied                   = 15
         dp_out_of_memory                = 16
         disk_full                       = 17
         dp_timeout                      = 18
         file_not_found                  = 19
         dataprovider_exception          = 20
         control_flush_error             = 21
         others                          = 22
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Regards
    Sridhar

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • How to get Data from SAP B1 through Journal Entries objects (Excel VBA)

    Hi Genius
    i had try to login SAB B1 thorugh MS Excel VBA code and it worked well. but i need some questions regards getting the data from after login. that means i want the Posting date, Transaction No, account code, debit and credit amount from Journal entries posted in a particular day through MS excel VBA into excel sheets 1 cell A1:E1
    how i get it if any possible ways to do that
    here my code to login
    Public Sub login()
        Sheets("Login").Select  'access the login tab
        Worksheets("Login").Range("B1").Activate 'put focus on cell B1 (manager)
        B1UserID = Trim(ActiveCell.Value2) 'set Businsss One user
        ActiveCell.Offset(1, 0).Activate
        B1Password = Trim(ActiveCell.Value2) 'set Business One password
        ActiveCell.Offset(1, 0).Activate
        sqluser = Trim(ActiveCell.Value2) 'set SQL user
        ActiveCell.Offset(1, 0).Activate
        sqlpass = Trim(ActiveCell.Value2) 'set SQL password
        ActiveCell.Offset(1, 0).Activate
        Db = Trim(ActiveCell.Value2)      'set Database name
        ActiveCell.Offset(1, 0).Activate
        Server = Trim(ActiveCell.Value2)  'set Server name
        Set company1 = New SAPbobsCOM.Company  'initialate DI company object
        company1.DbServerType = dst_MSSQL2005
        company1.Server = Server
        company1.DbUserName = sqluser
        company1.DbPassword = sqlpass
        company1.CompanyDB = Db
        company1.UserName = B1UserID
        company1.Password = B1Password
        'connect to the database
         lRetCode = company1.Connect
            If lRetCode <> 0 Then
                sErrMsg = company1.GetLastErrorDescription
                MsgBox (sErrMsg)
            Else
                MsgBox ("Connected to: " & company1.CompanyName)
            End If
    End Sub
    pls help me
    advance thanks to solvers

    Gordons way is the easiest - just query the OJDT table for journal entry headers and JDT1 for journal entry lines if needed.
    But if you want to work with the business objects:
    'Journal entry
       Dim oJE As SAPbobsCOM.JournalEntries
       Set oJE = company1.GetBusinessObject(oJournalEntries)
       oJE.GetByKey(1234)
       Dim postingDate as String
       postingDate = oJE.DueDate
    'etc etc

  • How to get summary columns in delimited text file

    How to get summary columns in delimited text file
    I am trying to generate a delimited text file output with delimited_hdr = no.The report is a Group above report with summary columns at the bottom.In the text file the headers are not getting repeated & thats ok.The problem is the summary data is getting repeated for each row of data.Is there a way where i will get all the data & summary data will get displayed only once.I have to import the delimited text file in excel spreadsheet.

    Sorry there were a typos :
    When I used desformat=DELIMITEDDATA with desttype=FILE, I get error "unknown printer driver DELIMITEDDATA". When you look for help, DELIMITED is not even listed as one of the values for DESTFORMAT. But if you scroll down and look for DELIMITER it says , this works only in conjuction with DESTFORMAT=DELIMITED !!!!!!??!! This is in 9i.
    Has this thing worked for anybody ? Can anyone please tell if they were able to suppress the sumary columns or the parent columns of a master-detail data for that matter ?

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

  • How to get header when we use CL_GUI_FRONTEND_SERVICES= GUI_DOWNLOAD

    Hi SDN's,
    Can u tell me how to get headers when we download data to excel with using (we are using DBF as file type in the following method )
    CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
    (We can't use GUI_DOWNLOAD)
    Thanks in advance..
    BR

    Hi,
    I m giving u a bdc code i hope ur prob ll be solved.
    *& Report  ZDTK_BDC_LT01
    *& PROGRAME TITLE : LT01
    *& AUTHOR         : D TARUN KUMAR
    *& MM CONSULTANT  : Mr. MRINMOYE CHAKRABORTY
    *& REQUEST NO.    : RD1K901995
    *& TRANSACTION ID : ZLT01
    *& PACKAGE        : ZTARUN
    *& DESCRIPTION : BDC REPORT TO UPLOAD INITIAL STOCK POSTING AND
    *&               STORAGE BINS THROUGH LT01.
    REPORT  ZDTK_BDC_LT01
           no standard page heading line-size 255.
    TYPE-POOLS: TRUXS.
    STRUCTURE DECLARATION
    TYPES : BEGIN OF TY_UPLOAD,
                     LGNUM(3),
                     BETYP(1),
                     BENUM(10),
                    BWLVS(3),
                     MATNR(18),
                    BISMT(18),
                     ANFME(16),
                    WERKS(4),
                    LGORT(4),
                     CHARG(10),
                    LETYP(10),
                    VLTYP(3),
                    VLBER(3),
                    VLPLA(10),
                    VLQNR(10),
                     NLTYP(3),
                    NLBER(3),
                     NLPLA(10),
                    NLQNR(10),
              END OF TY_UPLOAD.
    INTERNALTABLE & WORKAREA DECLARATION
    DATA : T_UPLOAD TYPE STANDARD TABLE OF TY_UPLOAD,
           T_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
           T_BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL,
           W_UPLOAD TYPE TY_UPLOAD,
           W_BDCDATA TYPE BDCDATA,
           W_BDCMSGCOLL TYPE BDCMSGCOLL,
    GLOBLE DECLARATION
           G_FLNAME TYPE STRING,
           G_MESSAGE(70) TYPE C,
           IT_RAW TYPE TRUXS_T_TEXT_DATA,
    GLOBLE DECLARATION
           WA_OPT TYPE CTU_PARAMS.
           WA_OPT-UPDMODE = 'A'.
           WA_OPT-DEFSIZE = 'X'.
           WA_OPT-DISMODE = 'A'.
    SLECTION SCREEN DECLARATION
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 2.
    PARAMETER : P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    PERFORM GET_FILENAME.
    START-OF-SELECTION.
    PERFORM UPLOAD_DATA.
    *PERFORM GET_FINAL.
    *PERFORM GET_MIGO.
    PERFORM SESSION.
    *PERFORM TEST.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR W_BDCDATA.
      W_BDCDATA-PROGRAM  = PROGRAM.
      W_BDCDATA-DYNPRO   = DYNPRO.
      W_BDCDATA-DYNBEGIN = 'X'.
      APPEND W_BDCDATA TO T_BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR W_BDCDATA.
        W_BDCDATA-FNAM = FNAM.
        W_BDCDATA-FVAL = FVAL.
        APPEND W_BDCDATA TO T_BDCDATA.
    ENDIF.
    ENDFORM.
    *&      Form  GET_FILENAME
          TEXT
    FORM GET_FILENAME .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
       FIELD_NAME          = 'P_FILE'
    IMPORTING
       FILE_NAME           = P_FILE
    ENDFORM.                    " GET_FILENAME
    *&      Form  UPLOAD_DATA
          text
    form UPLOAD_DATA .
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
        I_LINE_HEADER              = 'X'
        I_TAB_RAW_DATA             = IT_RAW
        I_FILENAME                 = P_FILE      "WORK TABLE
      TABLES
        I_TAB_CONVERTED_DATA       = T_UPLOAD[]    "ACTUAL DATA
    EXCEPTIONS
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " UPLOAD_DATA
    *&      Form  SESSION
          text
    FORM SESSION .
    *sort t_upload by bismt.
    LOOP AT T_UPLOAD INTO W_UPLOAD.
    REFRESH T_BDCDATA.
    *CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input         = W_UPLOAD-CHARG
    IMPORTING
      OUTPUT        = W_UPLOAD-CHARG .
    *CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input         = W_UPLOAD-VLBER
    IMPORTING
      OUTPUT        = W_UPLOAD-VLBER .
    *CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input         = W_UPLOAD-NLTYP
    IMPORTING
      OUTPUT        = W_UPLOAD-NLTYP .
    *CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input         = W_UPLOAD-NLBER
    IMPORTING
      OUTPUT        = W_UPLOAD-NLBER .
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = W_UPLOAD-CHARG
    IMPORTING
       OUTPUT        = W_UPLOAD-CHARG .
    DATA : BWLVS(3),
           LGORT(4),
           WERKS(4),
           CHARG(10),
           LETYP(10),
           VLTYP(3),
           VLBER(3),
           VLPLA(10),
           VLQNR(10),
           NLTYP(3),
           NLBER(3),
           NLQNR(10).
    DATA : W_MATNR(18).
    *SELECT SINGLE MATNR FROM MARA INTO W_MATNR
                      WHERE BISMT = W_UPLOAD-BISMT.
    BWLVS = '999'.
    LGORT = '3500'.
    WERKS = '1030'.
    LETYP = 'E1'.
    VLTYP = '998'.
    VLBER = '001'.
    VLPLA = 'AUFNAHME'.
    NLTYP = '354'. "(packaging material)
    *NLTYP = '353'. "(spareparts material)
    NLBER = '001'.
    *include bdcrecx1.
    *start-of-selection.
    *perform open_group.
    perform bdc_dynpro      using 'SAPML03T' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LTAP-CHARG'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LTAK-LGNUM'
                                  W_UPLOAD-LGNUM.  "'350'.
    perform bdc_field       using 'LTAK-BENUM'
                                  W_UPLOAD-BENUM.  "'1000000000'.
    perform bdc_field       using 'LTAK-BETYP'
                                  W_UPLOAD-BETYP.  "'P'.
    perform bdc_field       using 'LTAK-BWLVS'  BWLVS.    "'999'.
    perform bdc_field       using 'LTAP-MATNR'
                                  W_upload-MATNR.    "'40000009'.
    perform bdc_field       using 'RL03T-ANFME'
                                  W_UPLOAD-ANFME.    "'1,000'.
    perform bdc_field       using 'LTAP-WERKS' WERKS.    "'1030'.
    perform bdc_field       using 'LTAP-CHARG'
                                  w_upload-charg.
    perform bdc_dynpro      using 'SAPML03T' '0102'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LTAP-NLPLA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RL03T-ANFME'
                                  W_UPLOAD-ANFME.    "'1,000'.
    *perform bdc_field       using 'LTAP-ALTME'
                                 'KG'.
    perform bdc_field       using 'LTAP-LETYP' LETYP.    "'E1'.
    *perform bdc_field       using 'LTAP-CHARG' W_UPLOAD-CHARG.    "'0000000101'.
    perform bdc_field       using 'LTAP-VLTYP' VLTYP.    "'998'.
    perform bdc_field       using 'LTAP-VLBER' VLBER.    "'001'.
    perform bdc_field       using 'LTAP-VLPLA' VLPLA.    "'AUFNAHME'.
    perform bdc_field       using 'LTAP-NLTYP'
                                   W_UPLOAD-NLTYP.       "'351'.
    perform bdc_field       using 'LTAP-NLBER' NLBER.    "'001'.
    perform bdc_field       using 'LTAP-NLPLA'
                                  W_UPLOAD-NLPLA.    "'01 00 01'.
    *perform bdc_transaction using 'LT01'.
    *perform close_group.
    CALL TRANSACTION 'LT01' USING T_BDCDATA
                            MODE 'A'
                          UPDATE 'A'
                            OPTIONS FROM WA_OPT
         MESSAGES INTO T_BDCMSGCOLL.
    IF SY-SUBRC <> 0.
    READ TABLE T_BDCMSGCOLL INTO W_BDCMSGCOLL INDEX 1.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID        = SY-MSGID
            LANG      = 'EN'
            NO        = SY-MSGNO
            V1        = SY-MSGV1
            V2        = SY-MSGV2
            V3        = SY-MSGV3
            V4        = SY-MSGV4
          IMPORTING
            MSG       = G_MESSAGE
          EXCEPTIONS
            NOT_FOUND = 1
            OTHERS    = 2.
        IF SY-SUBRC = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          WRITE : / W_upload-matnr ,'-----' , G_MESSAGE.
          REFRESH T_BDCMSGCOLL.
        ENDIF.
        ENDIF.
    *clear : w_matnr, w_upload.
    ENDLOOP.
    ENDFORM.                    " SESSION

  • I have lost my "Basic" panel in the Develop module and can't figure out how to get it back. My right panel goes from the Histogram straight to the Tone Curve panel.  My Basic panel should be below the Histogram.  Any ideas how to get it back.  I have even

    I have lost my "Basic" panel in the Develop module and can't figure out how to get it back. My right panel goes from the Histogram straight to the Tone Curve panel.  My Basic panel should be below the Histogram.  Any ideas how to get it back.  I have even uninstalled my lightroom and reinstalled it with same issue.  Help!!!

    Right click on or near one of the other headers and a pop-up will appear and you will be able to select the Basic Panel for viewing.

  • OSB: Static Vs Dynamic Routing With "Get All Headers"

    Hi
    How Static and Dynamic Routing works when calling Business Service pointing to a service inside or out-side the domain with respect to carrying "Get All Headers".
    The scenario is
    I have two BIZ services of http protocol, B1 pointing to a serive with-in the same domain and B2 pointing to a serivce outside the domain.
    Now i am calling both BIZs throught Static and Dynamic Routing
    1. Proxy X calls BIZ1 using Static Routing
    2. Proxy X calls BIZ1 using Dynamic Routing
    3. Proxy X calls BIZ2 using Static Routing
    4. Proxy X calls BIZ2 using Dynamic Routing
    Question: In all 4 cases, does "Get All Headers" get passed to called service?. How is the behaviour?
    Thanks
    Venkata Madhu

    If you're getting errors like -
    ORA-12514: TNS:listener does not currently know of service requested in connect
    And you're database has been started you can -
    'alter system register'
    and that will register the database with the listener.
    If you are trying to start up databases remotely you need to have a static entry (listener.ora entry) otherwise you will not be able to connect to the database and will get the above error. I've seen people connect remotely, shutdown the database, try startup and they are not able to. Good way to shoot yourself in the foot.

Maybe you are looking for

  • Bridge batch to Photoshop CS4 error from subfolder

    Hello I used to launch Photoshop scripts from Bridge CS2 using the "tools->photoshop->batch" menu. Now that I upgraded to CS4, I have an error message: "a general photoshop error appeared. This function may not be available in this Photoshop version"

  • How can I delete text or rows in pdf?

    i tried to edit or delete text in my pdf but I can't. So what do I do

  • I can't use mi wifi in my ipad2 with ios6

    Please help me, i can't use my wifi with my ipad2 wifi with ios6. I need use my ipad, please your help or tech me how i can downgrade to ios 5.1.1

  • Rendering in Quicktime changes build timing.

    The build timing is perfect in the individual slides, but when I play the entire presentation, the build timing falls apart. Text no longer appears and disappears in proper sync, especially with the slides that contain video. When I run the presentat

  • Is it possible to restore an ipad from icloud backup of an iphone?

    I don't know if this is technically possible.  We have several iOs devices associated with one apple id, an iphone, ipad, and ipod.  I wanted to know if I can delete all the stuff from my ipad and restore it with stuff from the iphone. Thanks for any