Excel Upload and moving the data to dynamic itab

Hi Folks,
I am building a fieldcatalog dynamically based on the table name and then creating a dynamic internal table based on the fieldcatalog.Now I have a excel sheet having the fields in the same structure as the fieldcatalog that I built.I want to upload the data in the excel to an internal table having the structure of the fieldcatalog I built.I am having a problem in moving the data from the excel to the itab (dynamic itab built based on the fieldcatalog)
1.Building the fieldcatalog.
data:gt_fieldcat    TYPE lvc_t_fcat.
  ls_fieldcat-tabname    = p_tabname.
  ls_fieldcat-fieldname  = p_fieldname.  
  ls_fieldcat-inttype    = 'C'.
  ls_fieldcat-outputlen  = wa_dfies-outputlen.   
  ls_fieldcat-coltext    = wa_dfies-fieldtext.
  APPEND: ls_fieldcat TO gt_fieldcat.
  CLEAR : ls_fieldcat.
2.Building the dynamic itab
DATA:gp_table       TYPE REF TO data.
FIELD-SYMBOLS: <gt_table> TYPE table,
CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog = gt_fieldcat
    IMPORTING
      ep_table        = gp_table.
  ASSIGN gp_table->* TO <gt_table>.
3.Now I have an excel with a similar structure with data.Uploading the excel data into itab.
DATA: g_t_xltab  TYPE STANDARD TABLE OF ty_xltab,
      it_rawdata TYPE truxs_t_text_data,
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR    =
      i_line_header        = 'X'
      i_tab_raw_data       = it_rawdata
      i_filename           = xls_filename
    TABLES
      i_tab_converted_data = g_t_xltab[]
    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.
*Move the data that got uploaded from excel into
*respective internal tables.
    LOOP AT g_t_xltab
    here I want move the data into an internal table having the structure I built using
    the fieldcatalog/dynamic itab ie    <gt_table>.
    Endloop.
I tried using ASSIGN COMPONENT sy-index of <gt_table> and move-corresponding but in vain as I am not that much familiar with dynamic itab using field symbols.Kindly let me know how the excel data can be moved to dynamic itab.
Thanks,
K.Kiran.

Hi,
you can try some logic like this. Please note this is just an example
TYPE-POOLS:truxs.
TYPES:BEGIN OF ty_xltab,
      field TYPE string,
      END OF ty_xltab.
DATA:wa TYPE ty_xltab.
DATA:lv_len TYPE i.
DATA:startpos TYPE i.
FIELD-SYMBOLS:<fs_line> TYPE mara.
FIELD-SYMBOLS:<fs> TYPE ANY.
DATA: g_t_xltab  TYPE STANDARD TABLE OF ty_xltab,
      it_rawdata TYPE truxs_t_text_data.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR    =
      i_line_header        = 'X'
      i_tab_raw_data       = it_rawdata
      i_filename           = ' '
    TABLES
      i_tab_converted_data = g_t_xltab[]
    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.
startpos = 0.
LOOP AT g_t_xltab INTO wa.
  DO.
    ASSIGN COMPONENT sy-index OF STRUCTURE <fs_line> TO <fs>.
    IF sy-subrc = 0.
      DESCRIBE FIELD <fs> OUTPUT-LENGTH lv_len.
      IF lv_len > 0.
        <fs> = wa-field+startpos(lv_len).
        startpos = startpos + lv_len.
      ENDIF.
    ELSE.
      append <fs_line> to <fs_tab>.
      EXIT.
    ENDIF.
  ENDDO.
ENDLOOP.
Sorry my answer is not for you requirement..Please Ignore.
Your solution can be easily solved by looking at the concept Assign component . Please search
Edited by: Keshav.T on Nov 7, 2011 1:42 PM

Similar Messages

  • How do I read from a text file that is longer than 65536 lines and write the data to an Excel spreadshee​t and have the data write to a new column once the 65536 cells are filled in a column?

    I have data that is in basic generic text file format that needs to be converted into Excel spreadsheet format.  The data is much longer than 65536 lines, and in my code I haven't been able to figure out how to carry over the data into the next column.  Currently the conversion is done manually and generates an Excel file that has a total of 30-40 full columns of data.  Any suggestions would be greatly appreciated.
    Thanks,
    Darrick 
    Solved!
    Go to Solution.

    No need to use nested For loops. No need for any loop anyway. You just have to use a reshape array function. The picture below shows how to proceed.
    However, there may be an issue if your element number is not a multiple of the number of columns : zero value elements will be added at the end of the last column in the generated 2D array. Now the issue depends on the way you intend store the data in the Excel spreadsheet : you could convert the data as strings, replace the last zero values with empty strings, and write the whole 2D array to a file (with the .xls extension ) using the write to spreadsheet function. Only one (minimal) problem : define the number of decimal digits to be used;
    or you could write the numeric array directly to a true Excel spreadsheet, using either the NI report generation tools or ActiveX commands, then replace the last elements with empty strings.
    We need more input from you to decide how to solve these last questions. 
    Message Edité par chilly charly le 01-13-2009 09:29 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Example_VI.png ‏10 KB

  • I need to rebuld the "C" drive on my computer will need to reinstall adobe cs6 when I am done, but have moved recently and lost the data to get that done. Help!

    I need to rebuld the "C" drive on my computer will need to reinstall adobe cs6 when I am done, but have moved recently and lost the data to get that done! Help!

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.7| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.window using the Lightroom 3 link to see those 'Important Instructions'.

  • How to copy and  paste the data directly from the excel to the PDF?

    hi,
    I have found the same question on the link:
    How to copy excel sheet to pdf form?
    But I didnt get my answer through that forum.
    My requirement is dat I should copy the data from excel sheet and directly paste it to PDF form.
    When I am trying to copy and paste ..all the data is getting pasted into a single block only.
    Kindly help.
    Thanks & Regards,
    Lina

    So you want the user/person to do the "cut&paste" action (ie. ctrlc ctrlv) and have the data paste itself across rows correctly much like Excel does. I don't think this "intelligence" is built into Adobe table controls as it is in Excel (and Excel is smart enough to even handle it different ways depending on how the user selects cells).
    The only thing I can think of is that you could "capture" the user trying to paste into a cell/row in your table (maybe in the onFocus or onClick events), then grab the data, parse it out (but looking for some character) and then have your code distribute the data across the rows. However, I personally think that would be a lot of overkill and prone to other issues and errors.

  • Dynamically generating the ssrs dataset and filling the data into the dataset and binding it to ssrs report dynamically

    I have a work to do, in ssrs we are using server reports in our project. i am looking for dynamically generating the ssrs dataset and filling the data into the dataset and binding the dataset to ssrs report(RDL) dynamically.
    Getting the dataset dynamically has a solution by using Report Definition Customization Extension (RDCE), but the problem is binding that dataset to the report(RDL) dynamically was not there.
    Here is the reference for RDCE http://www.codeproject.com/Articles/355461/Dynamically-Pointing-to-Shared-Data-Sources-on-SQL#6
    I looked for binding the dataset to the report(RDL) dynamically and searched many sites but i did not get the solution. Can anyone help me here.
    Is there any custom assemblies or any Custom data processing extensions to work around. Please help.
    Thanks in advance

    Hi Prabha2233,
    Thank you for your question.
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to pass the userid to a page and have the page display dynamic data specific to user?

    I am developing a web app and can create a user ID log in page.  The app has a login page, view data page, and a post data page.  I want the user to be able to login and view the data unique to them they have posted.  Also from the view data page is a link to a post data page where they can post more data to be viewed.
    I have 2 tables in the database: one for "people" with a column for email.  ID and email are primary key.  The other table is "datapost" with a column name for email.  Id is primary key and email is a foreign key that references the 'person' table.
    After the user logs in they should go to view data and see their data, the page is going to view data, but it is not pulling up their specific data.  Below is the code for the pages:
    Can anyone point me to a resource where I can view some example code?  ( I tried to paste what I had in this messagae but it wouldn't paste and pages are on server yet to view.)  I have read ALMOST ALL of the Adobe tutorials and tech notes but no answer.

    I am using PHP and MySQL.  I'm using sessions.
    PHP from the login page:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
    $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) :
    $theValue;
      $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
          break;
      return $theValue;
    $colname_statuserlogin = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_statuserlogin = $_SESSION['MM_Username'];
    mysql_select_db($database_statprogram, $statprogram);
    $query_statuserlogin = sprintf("SELECT email, password FROM people WHERE
    email = %s", GetSQLValueString($colname_statuserlogin, "text"));
    $statuserlogin = mysql_query($query_statuserlogin, $statprogram) or
    die(mysql_error());
    $row_statuserlogin = mysql_fetch_assoc($statuserlogin);
    $totalRows_statuserlogin = mysql_num_rows($statuserlogin);
    $colname_statuserlogin = "-1";
    if (isset($_SERVER['email'])) {
      $colname_statuserlogin = $_SERVER['email'];
    mysql_select_db($database_statprogram, $statprogram);
    $query_statuserlogin = sprintf("SELECT email, password FROM people WHERE
    email = %s", GetSQLValueString($colname_statuserlogin, "text"));
    $statuserlogin = mysql_query($query_statuserlogin, $statprogram) or
    die(mysql_error());
    $row_statuserlogin = mysql_fetch_assoc($statuserlogin);
    mysql_select_db($database_statprogram, $statprogram);
    $query_statuserlogin = "SELECT * FROM datapost";
    $statuserlogin = mysql_query($query_statuserlogin, $statprogram) or
    die(mysql_error());
    $row_statuserlogin = mysql_fetch_assoc($statuserlogin);
    $totalRows_statuserlogin = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $totalRows_statuserlogin = $_SESSION['MM_Username'];
    $colname_statuserlogin = "-1";
    if (isset()) {
      $colname_statuserlogin = ;
    mysql_select_db($database_statprogram, $statprogram);
    $query_statuserlogin = sprintf("SELECT * FROM datapost WHERE email = %s",
    GetSQLValueString($colname_statuserlogin, "text"));
    $statuserlogin = mysql_query($query_statuserlogin, $statprogram) or
    die(mysql_error());
    $row_statuserlogin = mysql_fetch_assoc($statuserlogin);
    $query_statuserlogin = "SELECT email, password FROM people";
    $statuserlogin = mysql_query($query_statuserlogin, $statprogram) or
    die(mysql_error());
    $row_statuserlogin = mysql_fetch_assoc($statuserlogin);
    $totalRows_statuserlogin = mysql_num_rows($statuserlogin);
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['email'])) {
      $loginUsername=$_POST['email'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "email";
      $MM_redirectLoginSuccess = "statfatviewdata.php";
      $MM_redirectLoginFailed = "statfatuserlogin.php";
      $MM_redirecttoReferrer = true;
      mysql_select_db($database_statprogram, $statprogram);
      $LoginRS__query=sprintf("SELECT email, password, email FROM people WHERE
    email=%s AND password=%s",
      GetSQLValueString($loginUsername, "text"), GetSQLValueString($password,
    "text"));
      $LoginRS = mysql_query($LoginRS__query, $statprogram) or
    die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
        $loginStrGroup  = mysql_result($LoginRS,0,'email');
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;
        if (isset($_SESSION['PrevUrl']) && true) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    PHP from the view data page:
    <?php
    //initialize the session
    if (!isset($_SESSION)) {
      session_start();
    // ** Logout the current user. **
    $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
    if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
      $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
      //to fully log out a visitor we need to clear the session varialbles
      $_SESSION['MM_Username'] = NULL;
      $_SESSION['MM_UserGroup'] = NULL;
      $_SESSION['PrevUrl'] = NULL;
      unset($_SESSION['MM_Username']);
      unset($_SESSION['MM_UserGroup']);
      unset($_SESSION['PrevUrl']);
      $logoutGoTo = "statfatthankyou.php";
      if ($logoutGoTo) {
        header("Location: $logoutGoTo");
        exit;
    ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    $MM_authorizedUsers = "";
    $MM_donotCheckaccess = "true";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
      // For security, start by assuming the visitor is NOT authorized.
      $isValid = False;
      // When a visitor has logged into this site, the Session variable
    MM_Username set equal to their username.
      // Therefore, we know that a user is NOT logged in if that Session
    variable is blank.
      if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain
    users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
        if (in_array($UserName, $arrUsers)) {
          $isValid = true;
        // Or, you may restrict access to only certain users based on their
    username.
        if (in_array($UserGroup, $arrGroups)) {
          $isValid = true;
        if (($strUsers == "") && true) {
          $isValid = true;
      return $isValid;
    $MM_restrictGoTo = "statfatuserlogin.php";
    if (!((isset($_SESSION['MM_Username'])) &&
    (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'],
    $_SESSION['MM_UserGroup'])))) {
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
      $MM_referrer .= "?" . $QUERY_STRING;
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" .
    urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo);
      exit;
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
    $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) :
    $theValue;
      $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
          break;
      return $theValue;
    }if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
    $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) :
    $theValue;
      $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_statviewdata = 1;
    $pageNum_statviewdata = 0;
    if (isset($_GET['pageNum_statviewdata'])) {
      $pageNum_statviewdata = $_GET['pageNum_statviewdata'];
    $startRow_statviewdata = $pageNum_statviewdata * $maxRows_statviewdata;
    $colname_statviewdata = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_statviewdata = $_SESSION['MM_Username'];
    mysql_select_db($database_statprogram, $statprogram);
    $query_statviewdata = sprintf("SELECT * FROM datapost WHERE email = %s",
    GetSQLValueString($colname_statviewdata, "text"));
    $query_limit_statviewdata = sprintf("%s LIMIT %d, %d", $query_statviewdata,
    $startRow_statviewdata, $maxRows_statviewdata);
    $statviewdata = mysql_query($query_limit_statviewdata, $statprogram) or
    die(mysql_error());
    $row_statviewdata = mysql_fetch_assoc($statviewdata);
    if (isset($_GET['totalRows_statviewdata'])) {
      $totalRows_statviewdata = $_GET['totalRows_statviewdata'];
    } else {
      $all_statviewdata = mysql_query($query_statviewdata);
      $totalRows_statviewdata = mysql_num_rows($all_statviewdata);
    $totalPages_statviewdata =
    ceil($totalRows_statviewdata/$maxRows_statviewdata)-1;
    $pageNum_statviewdata = 0;
    if (isset($_GET['pageNum_statviewdata'])) {
      $pageNum_statviewdata = $_GET['pageNum_statviewdata'];
    $startRow_statviewdata = $pageNum_statviewdata * $maxRows_statviewdata;
    $maxRows_statfatstats = 10;
    $pageNum_statfatstats = 0;
    if (isset($_GET['pageNum_statfatstats'])) {
      $pageNum_statfatstats = $_GET['pageNum_statfatstats'];
    $startRow_statfatstats = $pageNum_statfatstats * $maxRows_statfatstats;
    $colname_statfatstats = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_statfatstats = $_SESSION['MM_Username'];
    mysql_select_db($database_statprogram, $statprogram);
    $query_statfatstats = sprintf("SELECT * FROM datapost WHERE email = %s",
    GetSQLValueString($colname_statfatstats, "text"));
    $query_limit_statfatstats = sprintf("%s LIMIT %d, %d", $query_statfatstats,
    $startRow_statfatstats, $maxRows_statfatstats);
    $statfatstats = mysql_query($query_limit_statfatstats, $statprogram) or
    die(mysql_error());
    $row_statfatstats = mysql_fetch_assoc($statfatstats);
    if (isset($_GET['totalRows_statfatstats'])) {
      $totalRows_statfatstats = $_GET['totalRows_statfatstats'];
    } else {
      $all_statfatstats = mysql_query($query_statfatstats);
      $totalRows_statfatstats = mysql_num_rows($all_statfatstats);
    $totalPages_statfatstats =
    ceil($totalRows_statfatstats/$maxRows_statfatstats)-1;
    $maxRows_stattotallost = 10;
    $pageNum_stattotallost = 0;
    if (isset($_GET['pageNum_stattotallost'])) {
      $pageNum_stattotallost = $_GET['pageNum_stattotallost'];
    $startRow_stattotallost = $pageNum_stattotallost * $maxRows_stattotallost;
    $colname_stattotallost = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_stattotallost = $_SESSION['MM_Username'];
    mysql_select_db($database_statprogram, $statprogram);
    $query_stattotallost = sprintf("SELECT totalincheslost, totalwtlost FROM
    datapost WHERE email = %s", GetSQLValueString($colname_stattotallost,
    "text"));
    $query_limit_stattotallost = sprintf("%s LIMIT %d, %d",
    $query_stattotallost, $startRow_stattotallost, $maxRows_stattotallost);
    $stattotallost = mysql_query($query_limit_stattotallost, $statprogram) or
    die(mysql_error());
    $row_stattotallost = mysql_fetch_assoc($stattotallost);
    if (isset($_GET['totalRows_stattotallost'])) {
      $totalRows_stattotallost = $_GET['totalRows_stattotallost'];
    } else {
      $all_stattotallost = mysql_query($query_stattotallost);
      $totalRows_stattotallost = mysql_num_rows($all_stattotallost);
    $totalPages_stattotallost =
    ceil($totalRows_stattotallost/$maxRows_stattotallost)-1;
    $queryString_statfatstats = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_statfatstats") == false &&
            stristr($param, "totalRows_statfatstats") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_statfatstats = "&" . htmlentities(implode("&",
    $newParams));
    $queryString_statfatstats = sprintf("&totalRows_statfatstats=%d%s",
    $totalRows_statfatstats, $queryString_statfatstats);
    ?>
    Thank you!

  • Preceeding zeroes while excel upload and download

    Hi,
    I am uploading some data from excel into an internal table,processing it and then downloading it again in excel.
    For Excel Upload I am using CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    For Excel Download I am using GUI_DOWNLOAD.
    But the problems is when the data is like 01 it is downloading it as 1 in the excel.The user don't want to do any changes after downloading it to the excel and want the data 01 to be dowloaded as 01 itself and not as 1.
    We can format it in excel but the user is not willing for that.Any possibility that we can handle it in the program.
    Thanks,
    K.Kiran.

    You have to use OLE technique for the same....that will solve your case.
    supposae i want to make the 5th , 6th and 7th coloumn , as character format.
    The below scenario will help.
    collect the contents of the excel in  it[] ,
      DESCRIBE TABLE it[] LINES wf_it_line.
      wf_it_line = wf_it_line + 8.
      CLEAR : wf_cellx, wf_celly, wf_cellr.
      CALL METHOD OF wf_excel 'Cells' = wf_cellx
      EXPORTING
       #1 = 8
       #2 = 5.
      CALL METHOD OF wf_excel 'Cells' = wf_celly
      EXPORTING
       #1 = wf_it_line
       #2 = 7.
      CALL METHOD OF wf_excel 'Range' = wf_cellr
       EXPORTING
    #1 = wf_cellx
    #2 = wf_celly.
      SET PROPERTY OF wf_cellr 'NumberFormat' = '@' .
    this will change the format of the excel.
    then call the below method
      CALL METHOD cl_gui_frontend_services=>clipboard_export
          IMPORTING
            data                 = it[]
          CHANGING
            rc                   = l_rc
          EXCEPTIONS
            cntl_error           = 1
            error_no_gui         = 2
         not_supported_by_gui = 3
            OTHERS               = 4.
      CALL METHOD OF wf_excel 'Cells' = wf_cell1
        EXPORTING
         #1 = 1
         #2 = 1.
      CALL METHOD OF wf_excel 'Cells' = wf_cell2
        EXPORTING
         #1 = 1
         #2 = 1.
      CALL METHOD OF wf_excel 'Range' = wf_range
        EXPORTING
         #1 = wf_cell1
         #2 = wf_cell2.
      CALL METHOD OF wf_range 'Select'.
      CALL METHOD OF wf_worksheet 'Paste'.
    then call the method 'SAVEAS' to save the excel.
    Edited by: Rudra Prasanna Mohapatra on Jan 22, 2009 5:47 AM

  • How do I upload and attach the file to Service Request

    [This thread was migrated from the On Demand Developer Forum in the old Siebel Community]
    drangineni
    New Contributor
    Hi,
    I am trying to upload a file and add it to a Service object as an
    attachement. I greatly appreciate if you could provide any code or
    sample...
    Thanks.
    Daya
    Product: CRM OnDemand
    10-21-2006 10:58 AM
    Re: How do I upload and attach the file to Service Request...
    BigSlick
    Valued Contributor
    On Demand doesn't support adding attachments via web services. One
    solution I've seen is depending on the scenario is to create a web link
    field on an object that's based on a custom text field. Your web service
    can populate that custom field and the web link can generate a dynamic
    link to the file in On Demand's UI. However, this depends on where the
    attachment is located and if the user needs some sort of firewall access.
    Hope this helps
    -BigSlick
    10-23-2006 11:43 AM
    ==============================================================================
    Click on the board or message subject at the top to return.

    Yes this still holds ture.
    Bardo

  • Connecting to SQl server ( MS acess front end) and pull the data into BI

    Dear all,
    i need to extract the data from SQl server ( MS acess front end) and pull the data into BI .
    i need to know what are the steps need to follow on this..
    can any one help me on this...!
    Thanks,
    Siva

    Hi,
    1. login to sql server u2013 with ur server credentials  and connect.
    2. select ur sql for ex: sap bw
    3. Right click u2013 sapbw - task - export data  From sql to excel I m exporting So give sql details 
    4. Destination u2013 select excel.. and browse where u want to save the fileu2026
    5. give next
    6. select from which table u want to export
    7. click on  next
    8. click on finish
    9. close
    10. go to desktop and open the xyz.xls file
    11. not make it as csv file and load the data to BI as a flat file
    Hope it will help you.
    Regards,

  • How to export the text edit data to excel file without splitting the data in excel file?

    how to export the text edit data to excel file without splitting the data in excel file?
    I have a requirement in SAP HR where in the appraiser can add comments in the area given and can export that to excel file. Currently the file is getting exported but the comments getting split into deifferent rows.
    I want the entire comment to be fit in one row.
    Please help.
    Thank you

    Hi,
    if your text edit value is stored in 'lv_string' variable.
    then before exporting the value to excel you have to remove CL_ABAP_CHAR_UTILITIES=>NEWLINE
    that is '#' from the variable lv_string.
    for that use code some thing like this.
    REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE in lv_string WITH space.
    I think this will do the trick.

  • When I save a PDF as an Excel File, all of the data in the PDF is put into one column (AdobeXI)

    Hi, thanks for taking the time...
    I'm running a machine with Windows 7, Office 2010, and Acrobat XI.  When I save a specific PDF as an Excel workbook, all of the data in the original PDF is sorted correctly in four columns.  When the same task is performed on this file on another user's machine, all of the data is sorted into one column.  The user has the same versions of Windows, Office, and Acrobat.  I've attempted the "Repair installation" option but the problem persists.  Any suggestions?  Thanks again for helping,
    -E

    Thanks for the quick reply.  I figured out how to get the desired results by using tagging.  For anyone who may reference this post in the future, I went to "Customize" in the top right corner of Adobe, then selected "Create new tool set...", looked under "accessiblity and found the "tag" option.  Hit ok, tag is added to the toolbar.  Then I highlighted the dataset in the PDF that was relevant to the output format, then clicked "tag", saved as spreadsheet.  Sorry I can't provide more details on how tagging works or if there's a more elegant solution available, but I'm sure one's out there.

  • How to convert a note in pdf and put the data in the structure SOOD4

    Good day!
    I'm using CONVERT_OTFSPOOLJOB_2_PDF.
    This function SO_DOCUMENTS_MANAGER selects a note from uploading and fills the structure SOOD4 with the file data.
    Need to do this automatically, convert to pdf and fill the structure SOOD4

    If I got your point correctly, you may use the function module SO_OBJECT_CREATE. Take a look at the thread below for an example on how to use it.
    Attachments to Material Master
    Regards,
    Felipe

  • Stage tab delimited CSV file and load the data into a different table

    Hi,
    I pretty new to writing PL/SQL packages.
    We are using Application express for our development. We get CSV files which is stored as a BLOB content in a table. I need to write a trigger that would get executed once the user the uploads the file and parse thru the Blob content and upload or stage the data in a different table.
    I would like to see if there is any tutorial or article that could explain the above process with the example or sample code to do the same. Any help in this regard will be highly appreciated.

    Hi,
    This is slightly unusual but at the same time easy to solve. You can read through a blob using the dbms_lob package, which is one of the Oracle supplied packages. This is presumably the bit you are missing, as once you know how you read a lob the rest is programming 101.
    Alternatively, you could write the lob out to a file on the server using another built in package called utl_file. This file can be parsed using an appropriately defined external table. External tables are the easiest way of reading data from flat files, including csv.
    I say unusual because why are you loading a csv file into a blob? A clob is almost understandable but if you can load into a column in a table why not skip this bit and just load the data as it comes in straight into the right table?
    All of what I have described is documented functionality, assuming you are on 9i or greater. But you didn't provide a version so I can't provide a link to the documentation ;)
    HTH
    Chris

  • Placed Excel file - why are the dates wrong?

    I have just relinked a number of Excel spreadsheets in a Mac InDesignCC document and all the dates are now 4 years and a day later than they should be.
    I've searched the forums and it appears that this is related to the Excel 1900/1904 date system but I can't find any solutions.
    The Excel files are from Windows Excel 2010 and look fine in Excel 2011 for Mac and in Apple Numbers.
    So any ideas how can I get InDesign to also show the dates correctly?
    Thanks,
    Graham
    PS asking my client to update all his files to an Apple Mac date system isn't an option!
    PPS I've tried changing the preference in Excel 2011 to "Use 1904 Date System" but that just adds 4 yrs to the dates in the Excel spreadsheets!!

    I have just relinked a number of Excel spreadsheets in a Mac InDesignCC document and all the dates are now 4 years and a day later than they should be.
    I've searched the forums and it appears that this is related to the Excel 1900/1904 date system but I can't find any solutions.
    The Excel files are from Windows Excel 2010 and look fine in Excel 2011 for Mac and in Apple Numbers.
    So any ideas how can I get InDesign to also show the dates correctly?
    Thanks,
    Graham
    PS asking my client to update all his files to an Apple Mac date system isn't an option!
    PPS I've tried changing the preference in Excel 2011 to "Use 1904 Date System" but that just adds 4 yrs to the dates in the Excel spreadsheets!!

  • Bapi to upload and download the leave details

    Hi all,
          Can  u please tell me a bapi to upload and download the leave details for the infotype 2001.
    Thanks.

    Hi
    Warning! The API methods "Delete," "Approve," "Create," and "Request," and "Change," as well as their corresponding RFCs:
    <b>bapi_absence_delete
    bapi_absence_create
    bapi_absence_approve
    bapi_absence_request
    bapi_absence_change</b>
    are <b>no longer valid</b>. Using these APIs can create inconsistencies in time data.
    Instead, use the corresponding API Methods "ManageDelete," "ManageCreation," and "ManageChange" for the Business Object BUS7007, as well as the following corresponding RFCs:
    <b>bapi_ptmgrattabs_mngdelete
    bapi_ptmgrattabs_mngcreation
    bapi_ptmgrattabs_mngchange</b>
    Regards
    Raj

Maybe you are looking for

  • How can I transfer files off an external hard drive formatted for windows?

    I just bought my first mac (yay!) and am trying to transfer my files off of my old pc.  The problem is that I stored all my personal files on an external hard drive, which is of course formatted for windows.  My mac will open it, but it is "read only

  • HOW TO CALCULATE NET SALES AND CONTRACT PRICE?

    Dear experts, I have the requirement of sales price report the report layout should be Prod descr    material Number   Contract type  contrcat name     rebate  net sales  contract price  units we have the master data information is reside already in

  • PKCS12 certificate payloads in OS X Server 10.9 Profile Manager

    Hi all, I'm unable to successfully push .p12 packaged certificate identities to devices managed by OS X Server 10.9 Profile Manager. The problem is that while the file is pushed to the device, it doesn't get unpacked and hence is unable to be used. I

  • Akonadi_notes_agent consumes a lot of memory

    Hi, I recently updated my Archlinux System to KDE 4.13.0. Since this update akonadi_notes_agent starts with low memory consumption but while I am working it takes more and more memory. Currently it consumes more than 1GB. Does anybody know how to fix

  • Hp 440 g1 probook screens with horizontal lines

    hello im using hp probook g1 from more than 1 year and now im having prob with the screen. some horizontal lines appear on the screen and below portion of the line flashes and show the upper part of the screen and below part of the lines fleshes with