<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to upload long text using BAPI_SERVICE_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933166#M691147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the code where you are calling the Create_text or Save_text please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2007 14:59:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-15T14:59:45Z</dc:date>
    <item>
      <title>How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933160#M691141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm uploading service master records (transaction AC03) through my program using function BAPI_SERVICE_CREATE. As per the requirements, for each service number, I've to pass long text also (refer to the last text area on the transaction screen).&lt;/P&gt;&lt;P&gt;In the tables section of the bapi BAPI_SERVICE_CREATE, there is a provision for an internal table on the form SERVICE_LONG_TEXTS. But it is of no use as even if I pass data to it, it is not written to the database.&lt;/P&gt;&lt;P&gt;Can anyone tell me solution for my problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Anuj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 16:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933160#M691141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T16:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933161#M691142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anuj&lt;/P&gt;&lt;P&gt;What are the values you are passing for following in the BAPI&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;MD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTS-LANGUAGE&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTS-LANGUAGE_ISO&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTS-FORMAT&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTS-LINE&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTSCHANGE_ID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 19:31:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933161#M691142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T19:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933162#M691143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usuall for long text you may have to explicitly call SAVE_TEXt upon successfull completion of BAPI. Something like shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              header = s_thead&lt;/P&gt;&lt;P&gt;              insert = 'X'&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              lines  = tlines&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              others = 1.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      call function 'COMMIT_TEXT'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                savemode_direct = 'X'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 23:51:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933162#M691143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T23:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933163#M691144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks MD and Krishna.&lt;/P&gt;&lt;P&gt;Let me explain the finer details of the program logic.&lt;/P&gt;&lt;P&gt;I'm uploading service master records from an excel sheet. Now service numbers can be externally provided or internally generated.&lt;/P&gt;&lt;P&gt;Currently, I am passing the records using BAPI_SERVICE_CREATE and the long text using CREATE_TEXT. The problem is that create_text takes service number as an input and for service numbers created using internal number range, its practically not feasible to retreive the created number during the program execution itself, to be further used in create_text.&lt;/P&gt;&lt;P&gt;So I hope Krishna you must have understood that your solution is good, but in my case, it is not feasible. This you can check from the transaction text area properties itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MD, as you have asked for the values I'm passing, so here they are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTS-LANGUAGE               : 'E'&lt;/P&gt;&lt;P&gt;*SERVICE_LONG_TEXTS-LANGUAGE_ISO&lt;/P&gt;&lt;P&gt;*SERVICE_LONG_TEXTS-FORMAT&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTS-LINE                          : Any long text&lt;/P&gt;&lt;P&gt;SERVICE_LONG_TEXTSCHANGE_ID                : 'X' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My only hope is that using the SERVICE_LONG_TEXTS I may be able to pass data. But it is not happening for my test cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anuj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 04:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933163#M691144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T04:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933164#M691145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't the BAPI_SERVICE_CREATE return the Service number in the exporting parameter SERVICE?. If so you can pass this number on to CREATE_TEXT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you can you can read from the SM tables using some search criteria to read the Service that just got created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 15:26:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933164#M691145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T15:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933165#M691146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Krishna for your reply.&lt;/P&gt;&lt;P&gt;Actually I had not given a thought to the exporting parameter of the function. So your suggestion raised my hopes.&lt;/P&gt;&lt;P&gt;But to tell you the truth, it did not work as you had said. I passed the service number returned by the function bapi_service_create to create_text, but the long text is not being stored.&lt;/P&gt;&lt;P&gt;To be sure, I even used the conversion routine CONVERSION_EXIT_ALPHA_OUTPUT to remove the extra zeroes before the service number, but even that did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anuj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 08:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933165#M691146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T08:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933166#M691147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the code where you are calling the Create_text or Save_text please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 14:59:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933166#M691147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T14:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933167#M691148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;As you required, I'm posting here the relevant lines of my code and data declarations as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;C_FOBJECT(10) TYPE C VALUE 'ASMD',&lt;/P&gt;&lt;P&gt;C_FID(4) TYPE C VALUE 'LTXT',&lt;/P&gt;&lt;P&gt;L_PASS_SPRAS TYPE BAPISRV_ASMD-MASTER_LANGU,&lt;/P&gt;&lt;P&gt;L_FNAME TYPE THEAD-TDNAME,&lt;/P&gt;&lt;P&gt;L_SERVICE_RET TYPE BAPISRV_ASMD-SERVICE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L_PASS_SPRAS = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SERVICE_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    IM_SERVICE_DATA     = L_SERVICE_DATA&lt;/P&gt;&lt;P&gt;    IM_SERVICE_DATAX    = L_SERVICE_DATAX&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    SERVICE             = L_SERVICE_RET&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    RETURN              = IT_RET&lt;/P&gt;&lt;P&gt;    SERVICE_DESCRIPTION = IT_SERV_DESC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    WAIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L_FNAME = L_SERVICE_RET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_TEXT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FID       = C_FID&lt;/P&gt;&lt;P&gt;    FLANGUAGE = L_PASS_SPRAS&lt;/P&gt;&lt;P&gt;    FNAME     = L_FNAME&lt;/P&gt;&lt;P&gt;    FOBJECT   = C_FOBJECT&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    FLINES    = IT_LONG_TEXT&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had also used the conversion routine CONVERSION_EXIT_ALPHA_OUTPUT for converting L_SERVICE_RET but here I've not added those lines, for the sake of simplicity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anuj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 05:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933167#M691148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T05:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933168#M691149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anuj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new program using the following code and run it using an existing service number to see if the longtext gets updated. I ran it in my system and it is working fine. If it works for you, then you can modify your code accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zlongtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: header like thead,&lt;/P&gt;&lt;P&gt;      ilines like tline occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: asnum like asmd-asnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  header-tdobject = 'ASMD'.&lt;/P&gt;&lt;P&gt;  header-tdname = asnum.            " Make sure it has leading zeroes.&lt;/P&gt;&lt;P&gt;  header-tdid = 'LTXT'.&lt;/P&gt;&lt;P&gt;  header-tdspras = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ilines-tdformat = '*'.&lt;/P&gt;&lt;P&gt;  ilines-tdline = 'Just a test to see how it works'.&lt;/P&gt;&lt;P&gt;  append ilines.&lt;/P&gt;&lt;P&gt;  clear ilines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      header                = header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INSERT                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      savemode_direct       = 'X'&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      lines                 = ilines&lt;/P&gt;&lt;P&gt;   exceptions&lt;/P&gt;&lt;P&gt;     id                    = 1&lt;/P&gt;&lt;P&gt;     language              = 2&lt;/P&gt;&lt;P&gt;     name                  = 3&lt;/P&gt;&lt;P&gt;     object                = 4&lt;/P&gt;&lt;P&gt;     others                = 5.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function 'COMMIT_TEXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      write: / 'updated successfully'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 21:56:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933168#M691149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T21:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload long text using BAPI_SERVICE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933169#M691150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Krishna for all the help and patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is resolved and SAVE_TEXT is giving the desired performance.&lt;/P&gt;&lt;P&gt;BTW, I'm still not sure why CREATE_TEXT was not saving the long text, since in both functions, we are passing exactly the same values!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anuj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 10:33:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-upload-long-text-using-bapi-service-create/m-p/2933169#M691150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T10:33:28Z</dc:date>
    </item>
  </channel>
</rss>

