<?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: Changing a field value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382819#M529112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the new PO number you can do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE sy-datum&lt;EM&gt;6(2) sy-datum&lt;/EM&gt;4(2) sy-datum(4) xvbak-bstnk INTO zzbstnk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jun 2007 12:20:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-01T12:20:29Z</dc:date>
    <item>
      <title>Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382816#M529109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within USEREXIT_SAVE_DOCUMENT I would like to change the Purchase Order Number depending on certain criteria and write this to the vbak table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to be able to change the Purchase Order Number to the current date in DD.MM.YYYY format plus the current contents of the vbak-bstnk field.  I have currently got the following code, but this only puts the date in YYYYMMDD format and it doesn't write the new PO Number field to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore when you go back into the sales order it still shows the original PO Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;   CONCATENATE sy-datum xvbak-bstnk INTO zzbstnk.
   xvbak-bstnk = zzbstnk.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be greatly received...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Carly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 11:48:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382816#M529109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T11:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382817#M529110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lc_date(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE sy-datum TO lc_date. "this gives you the desired date output&lt;/P&gt;&lt;P&gt;CONCATENATE lc_date xvbak-bstnk INTO yvbak-bstnk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date takes up 10 characters. BSTNK has 20 character. If you concatenate it and XVBAK-BSTNK is larger then 10 characters, it will be truncated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to change it, make sure that YVBAK = XVBAK. XVBAK is what you receive, YVBAK is what you return so changing XVBAK does not do anything while changing YVBAK does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roel van den Berge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 12:09:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382817#M529110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T12:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382818#M529111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Roel, this solves the DD.MM.YYYY problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this still does not update the new PO Number to the VBAK table.  It still shows the original PO Number when I look in VBAK and when I go into the Sales Order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help with this part?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 12:17:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382818#M529111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T12:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382819#M529112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the new PO number you can do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE sy-datum&lt;EM&gt;6(2) sy-datum&lt;/EM&gt;4(2) sy-datum(4) xvbak-bstnk INTO zzbstnk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 12:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382819#M529112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T12:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382820#M529113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CONCATENATE sy-datum&lt;EM&gt;6(2) sy-datum&lt;/EM&gt;4(2) sy-datum(4) xvbak-bstnk INTO zzbstnk separated by '.'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 12:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382820#M529113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T12:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382821#M529114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have now got the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    IF xvbak-bstnk = ''.
      WRITE sy-datum TO zznewdate.
      CONCATENATE zznewdate yvbak-bstnk INTO yvbak-bstnk.
    ELSE.
      WRITE sy-datum TO zznewdate.
      CONCATENATE zznewdate xvbak-bstnk INTO yvbak-bstnk.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This, however, does not update the database with the DD.MM.YYYY + ponumber, it either stays the same if the PO number has not been amended manually or changes to whatever you have changed it to...It doesn't take any notice of the DD.MM.YYYY part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 12:43:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382821#M529114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T12:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382822#M529115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CONCATENATE sy-datum&lt;EM&gt;6(2) sy-datum&lt;/EM&gt;4(2) sy-datum(4) INTO zzbstnk separated by '.'.&lt;/P&gt;&lt;P&gt;CONCATENATE zzbstnk ponumber into zzbstnk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Let me know how this is displaying for you. If it is not fixed I try for the fix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 13:39:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382822#M529115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T13:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382823#M529116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mind me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I used your code zzbstnk is displaying exactly what I want it to display, but I need this to then write back to VBAK to update the PO Number field. (i.e So next time I go into the Sales Order is shows the new PO field as DD.MM.YYYY+PONumber.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 14:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382823#M529116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T14:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382824#M529117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see this thread, regarding field updkz for updates:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="52370"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, is there an exit USEREXIT_MOVE_FIELD_TO_VBAK?  There was a post where someone had a similar problem with a field in VBAP, and they could use USEREXIT_MOVE_FIELD_TO_VBAP to change a field value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also see this thread:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="104229"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 14:50:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-a-field-value/m-p/2382824#M529117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T14:50:57Z</dc:date>
    </item>
  </channel>
</rss>

