How to get the complete data from Webdynpro using a RFC

hi guys,
A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
FUNCTION ZSEND_MAIL_ATTACHMENT.
""Local Interface:
*"  IMPORTING
*"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
*"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
*"  TABLES
*"      IT_MESSAGE STRUCTURE  SOLISTI1
Data Declaration
  DATA: gd_cnt TYPE i,
      gd_sent_all(1) TYPE c,
      gd_error TYPE sy-subrc,
      tab_lines LIKE sy-tabix.
Structure Declaration
  DATA : BEGIN OF it_file OCCURS 0,
          row(255),
         END OF it_file.
  DATA : BEGIN OF i_split OCCURS 0,
  row(50),
  END OF i_split.
Internal Table Declaration
  data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
  DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
  DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
  data : wa_receiver like table of SOMLRECI1 with header line.
  data : it_receiver like table of SOMLRECI1 with header line.
  data : v_bin_data like SOLISTI1 occurs 0 with header line.
  DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
*data bin_data1 like table of solix with header line.
  REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
  CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
  DATA V_SUBJECT(255) VALUE 'HI'.
  gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
  gd_doc_data-obj_langu = sy-langu.
  gd_doc_data-obj_name = 'SENDFILE'.
  gd_doc_data-obj_descr = v_subject.
  gd_doc_data-sensitivty = 'O'.
  APPEND GD_DOC_DATA.
Appending The Internal Table it_packing_list
  it_packing_list-head_start = 1.
  it_packing_list-head_num = 0.
  it_packing_list-body_start = 1.
  it_packing_list-doc_type = 'RAW'.
  it_packing_list-body_num = tab_lines.
  APPEND it_packing_list.
*CALL FUNCTION 'GUI_UPLOAD'
*EXPORTING
*filename = V_FILE_PATH
*filetype = 'BIN'
*TABLES
*data_tab = BIN_DATA.
  move bin_data to v_bin_data.
  append v_bin_data.
*move soli to bin_data.
  LOOP AT V_BIN_DATA into objbin.
MOVE v_bin_data TO objbin-line.
    APPEND objbin.
  ENDLOOP.
  CLEAR it_packing_list.
  DESCRIBE TABLE objbin LINES tab_lines.
  it_packing_list-transf_bin = 'X'.
  it_packing_list-head_start = 1.
  it_packing_list-head_num = 1.
  it_packing_list-body_start = 1.
  it_packing_list-doc_type = 'PDF'.
  it_packing_list-body_num = tab_lines.
  it_packing_list-doc_size = tab_lines * 255.
  APPEND it_packing_list.
data file(255) value '/tmp/bali.txt'.
*Appending The Internal Table it_receivers
close dataset '/tmp/bali.txt'.
open dataset '/tmp/bali.txt' for output in text mode encoding default.
if sy-subrc = 0.
loop at objbin.
transfer objbin to '/tmp/bali.txt'.
endloop.
else.
write 'hi'.
close dataset '/tmp/bali.txt'.
endif.
  it_receiver-receiver = '[email protected]'.
  it_receiver-rec_type = 'U'.
  it_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
  append it_receiver.
*Move wa_receiver[] to it_receivers[].
Clear it_receivers.
if i_OUT_PLACE_LEVEL NE 0.
loop at it_receivers into wa_receiver.
   loop at it_receivers into wa_receiver.
**Function Module To Post The Message To Externa Mail
     CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       EXPORTING
         document_data              = gd_doc_data
         put_in_outbox              = 'X'
         commit_work                = 'X'
       TABLES
         packing_list               = it_packing_list
         CONTENTS_TXT               = objbin
         receivers                  = it_receivers
       EXCEPTIONS
         too_many_receivers         = 1
         document_not_sent          = 2
         document_type_not_exist    = 3
         operation_no_authorization = 4
         parameter_error            = 5
         x_error                    = 6
         enqueue_error              = 7
         OTHERS                     = 8.
     clear wa_receiver.
ENDFUNCTION.

You have to convert your long string to a table of shorter strings.
There may be other ways, but one possibility is to use a loop to process you string.
while (there is something left)
   put the next e.g. 1024 characters in a new row of your table
endwhile
If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

Similar Messages

  • How to get the measurement data from IMU using SBRIO through SPI?

    Hi All,
    I’am trying to use the SPI communication protocol to realize the bridge between my Vectornav VN100 IMU chip and the LABView through the SBRIO 9602. I amended the SPI sample code from NI website based on my own device and configuration. It compiled and ran well. The problem is the IMU we are using need a 16 bytes command and it will give back a response containing the measurement data. But it seems that with the code I have, I can only send an at most 32 bits command once. Hope anyone who has experience in IMU implementation on LABView could give me some help! Thanks a lot!
    Nick

    Kyle,
    Thank you very much!
    I attached the amended program and the Manual Sheet of the IMU I am using.
    Since I only need to one port, I just amended the configuration for port 1 and adjusted the code for my device. 
    I think the problem exist in the data sending mechanism, you can check the requirement out in P12 and P13 of the manual sheet.
    Best Regards!
    Nick
    Attachments:
    Vectornav VN100.pdf ‏1774 KB
    spi_dual_port_example.zip ‏755 KB

  • How to get the history data from r3?

    Hi Experts,
    I have loaded stock data for jan through the flat file load.
    The stock consists for 2,9,16,23,30 th dates of Jan.
    Remaining dates stock came from R3.
    so problem is stock seems double(Not exactly) for one site(Plant).
    i checked in BI and i dont see any stock data for 31st Jan but it is there in R3.
    So how to get the data for 31st jan from R3 it is using the 2LIS_03_BX Extractor (Tables - MSEG,BSEG).
    i am really stuck up here please help me out..
    Thanks in advance,
    Regards,
    <BMP>

    You can get it from LBWE transaction in R/3 side:
    for example see below:
    Sales and Distribution (SD)          :  application 11, 13, 08 (in LBWE T-code)
    Materials Management (MM)        :  application 03, 02
    Logistics Execution (LE)               :  application 12
    Quality Management                  :  application 05
    Plant Maintenance (PM)              :  application 04, 17
    Customer Service (CS)               :  application 18
    Project System (PS)                   :  application 20
    SAP Retail                                    :  application 40,43,44,45

  • How to get the current Date from the system?

    How do I acquire the current date from the system? Also, if possible, can I assign the day, month and year separately into three variables and how? It would be thankful if some simple Example could be given. Thanx!

    import java.util.*;
    public class count {
    public count() {
    Calendar now = Calendar.getInstance();
    int month = now.get(Calendar.MONTH);
    int day = now.get(Calendar.DAY_OF_MONTH);
    int dayyear = now.get(Calendar.DAY_OF_YEAR);
    int year = now.get(Calendar.YEAR);
    int a = 365;
    int b = a - dayyear;
    System.out.println("The day is the" + " " + day);
    System.out.println("IT is the" + " " + month + " " + "month of the year");
    System.out.println("The year is" + " " + year);
    System.out.println("This many days till next year" + " " + b);
    public static void main(String[] args) {
    count cou = new count();
    }

  • How to get the forecast data from SCM into BW

    Hello,
    Is there a table or Function module in SCM F&R  that can be used  to transfer the forecast data from SCM F&R into BW? I dont see any Business content datasources that has the forecast data.
    I would like to get the future forecast data. For ex, if there is a forecast for a material and Site for the next 52 weeks, I would like to retrieve
    the same from SCM. I dont see any business content. The closest would be 0FRE_ANA_WEEKLY_1. But it has only the past data, not the future data.
    Thanks,
    SBS.

    Hi,
    You would follow the same process as you would for getting data from a R3 system to BW, i.e generate datsources on the APO side and then set the extraction to flow from APO to BW. On the BW side, you'll need a source system for the APO, replicate datsources, set up update and transfer rules in the infosource and then load data to the data targets.
    Cheers,
    Kedar

  • How to get the Current Date in webdynpro java

    Hi Experts,
                 In my project i have two date input fields called
                        1)Start Date
                      2)End Date   
    and one Absence type input field is there. The user wants to set the start Date ,End date and absence type.
    How to get the user set values in my project.i.e how to get the user inputs and the started date must be current date of the system and end date must be after the 3 months.
    Can any body send code regarding this.
    Thanks in advance.
    Regards,
    Venkat.
    Edited by: Venkat5939 on Jan 11, 2011 4:46 PM

    Hello Venkat,
    Current Date:
    Date date = new Date(System.currentTimeMillis());
    For getting the date after three months refer the following threads:
    Set date in a date field
    Date Function
    date format
    Hope it helps.
    Regards
    Nizamudeen SM

  • How to get the refreshed data from Input schedule while using evsnd

    Hi Experts,
                     I am using EvSnd function for sending the data from a Input schedule.
    Acc                Value                                            
    xx----
        xy------        10
        xz-------       20
    these above cell value 10,20 are getting sent by evsnd function which is written in different cell.
    Now after successfully sending, how I can see these are also getting refreshed, like in Evdre
    Acc                Value                                            
    xx----
            30
        xy------        10
        xz-------       20
    Thanks
    Anupam

    Thanks my friend.
    But the point is I need to show the updated data for all the cells (for xx, xy,xz). The point is if I use the evsnd then after the data has been sent, those two cells xy & xz will be blank once again. And so if the user will not be able to check what the data they have sent for these member from that sheet.
                  They have to get a report which will show the figures.
    And we can't even use the evgts in the xy/xz cell as the formula is going to be erased as soon as the user enter the data in that.
    so how we can do the sheet similar to evdre ip schedule..where after every data send the cell range shows latest data.

  • How to get the updated data from a third party database in office 365 list

    Hello - I am trying to access a third party software database to create a dynamic Dashboard in SharePoint, and my approach is :-  
    Sync the 3rd part database in list (should get sync in list whenever new data is added to the 3rd party database) or if possible syc the data from CSV file to sharepoint list.
    I need to get that data into Giant chart or Dashboard
    any help will be highly appreciated.
    Thank you!

    There are many options available in SharePoint Online office 365 for connecting to External data e.g. external lists, Business Data Web Parts etc. Please check these urls for more details -
    Introduction
    to external data
    Use
    external data in workbooks in SharePoint Online
    Overview of Business Connectivity Services in SharePoint 2013
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • How to get the raw data from particular document's schedule ?

    Hello,
    I am now able to get the data from a document usign RESTful Web Services SDK and what I need is to
    get the data not from the current version of the document but from the schedule that were executed some time ago
    with the older data than the current data.
    Any hints ?

    Hey Jacek,
    Please, look at the /schedules into Raylight API.
    Regards,
    Anthony

  • How to get the Relationships data from Opportunity Transaction in CRM

    Hi Friends,
    Could you please let me know the table / class to fetch the relationships data associated with a single(main) opportunity.
    There may be several object types like (activites, sub-opp's..etc) linked to a single  main(source) opportunity.
    I wanted the these fields information from Relationships tab From Opp transaction.
    Source Item No.
    Object Type
    Target Trans/Object
    Description
    Type of Linkage
    Could you please let me know.
    Regards
    Vijay

    Hi Vijay,
    Can you try function module CRM_DOC_FLOW_READ_DB?
    By giving opportunity GUID it will return associated information.
    Kind regards,
    Garcia

  • How to get the system date and time using java

    hi,
    I want system date in my out put. how to access system date. can v use utill packaegs (or) sql. which one is the best to get.
    Thanks & Regards,
    Kenny.

    import java.util.Date;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    public class MyClass {
    public void setTimeStamp() {
    int hour, minute, second, time = 0;
    Date dt=new Date();
    System.out.println(dt.getDate());
    System.out.println(dt.getMonth());
    System.out.println(dt.getYear());
    Calendar cal = new GregorianCalendar();
    hour = cal.get(Calendar.HOUR_OF_DAY);
    minute = cal.get(Calendar.MINUTE);
    second = + cal.get(Calendar.SECOND);
    System.out.println (hour + ":" + minute + ":" + second);
    public static void main (String args[]){
    MyClass app = new MyClass();
    app.setTimeStamp();
    }

  • How to get the HTML data formatted display using the Rrt template

    hi,
    I have a table which has data with html tags in it.
    eg as shown below.
    sample text is as follows:
    <BR>
    <b>MY TEST HERE HAS SOME BOLD TEXT IN IT. THIS WHOLE LINE SHOULD BE BOLD</b><br>and the rest of the text will not be bold.
    <BR><br>
    now I want to be able to display this text with the proper format using BI publisher / rt template.
    my report shows the tags as is instead of being formatted.
    please let me know how i can fix this
    Thanks
    knut

    http://blogs.oracle.com/xmlpublisher/2007/01/02.

  • How to get the PDF Document version when using Digital Signature

    Hi,
    I have a form which contains two signature fields.
    When i sign the form the pdf document is saved as a version which can be seen by clicking the Signature Panel.
    I need to get the binary of the versions stored in the form.
    Please suggest me the how to get the version data from the form.
    Regards,
    S.V.atish Kumar

    Hi Mithun:
    I think I have run into a similar issue and have not been able to find a resolution.
    I have been trying to place three groupings of data and limit them to 15 rows; additional rows would print on a void check on a next page using the rtf template.
    Earnings .............. Pre-Tax Deductions .........Taxes
    <line 1 earnings> <line 1 pre-tax deductions> <line 1 tax dedcutions>
    <line 2 earnings> <line 2 pre-tax deductions> <line 2 tax dedcutions>
    <line 3 earnings> <line 3 pre-tax deductions>
    <line 4 earnings> <line 4 pre-tax deductions>
    <line 5 earnings>
    <line 6 earnings>
    The template works fine with these lists as nested tables until I add in the restriction and filler for the 15 rows for the first table. The data in the 2nd two lists does not appear once the limitation is added.
    Check Writer (XML)  - Issues with payroll check stub in rtf
    As an alternative, I have been thinking adding the remaining line totals (over 15 rows) and adding a 16th row. However I have been running into an error when trying to use the code for-each-group.
    *** XML-22056: exactly one of four group attributes must be present in xsl:for-each-group
    Can you send me your template to review? My email is: Karen.Lacey(AT)paetec(DOT)com
    Thanks!
    Edited by: RedLacey on Dec 17, 2009 11:48 AM

  • How can I get the image data from Clipboard with LV

    Anybody knows How can get the image data after pressd "print screen button" with LV?
    I want to program a software which can save a image as a bmp or jpeg etc, and the image data is from pressed print screen button. 
    How to get it out from clipboard. I am trapping about. thanks in advance.
    Try to make everything Automatic

    You can have a look at Rolf Kalbermatter's post here (give him stars) or, if you're using scripting, you can use the Application class Get Clipboard Image method.
    Try to take over the world!

  • How to get the complete definition of a table using SQL?

    How to get the complete definition code of a table using SQL?

    Something like this ?
    SQL> set long 10000
    SQL> set pages 200
    SQL> select dbms_metadata.get_ddl('TABLE','EMP') from dual;
    DBMS_METADATA.GET_DDL('TABLE','EMP')
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    SQL>Amardeep Sidhu

Maybe you are looking for