on 12-21-2007 9:48 AM
Hello,
I have got the following problems with BSP and the NW 07abap Trial: hope somebody can help:
1.
When I call the transcation SE63, I have got a different transaction then it is shown at this blog (Pricture 4 and 5):
/people/sap.user72/blog/2005/04/15/bsp-howto-exploring-bsp-development-with-mvc-4
I can only go to Translation->Abap-Objects->Short texts
After that I get another popup window where I can SOTR OTR-Short texts
I get to some different screen: instead of a package and the Text from OTR I have to select an "object name" and a "translation area".
Is there any other transaction there I can translate the OTR? Or is there any way I can switch my transcation back to the transaction in the blog?
2.
I've created a BSP-Site with Flow Logic where an input field t_start is included (The user has to input a date in it). In the event-handler of the site (OnInputProcessing) the date should be checked if the user has not typed in a date that is before sy-datum. If the date is before sy-datum a message should appear to the screen to inform the user. Here is the source code:
******************************************************
IF t_start < sy-datum.
MESSAGE = cl_bsp_get_text_by_alias=>get_text( alias = 'y_abap_demo/errstart' language = sy-langu ).
page->messages->add_message( condition = 't_start' message = message severity = page->messages->co_severity_error ).
ENDIF.
******************************************************
I started the page with the debugger to see what is happening: Here is the get_text method:
******************************************************
method GET_TEXT .
SYSTEM-CALL OTR GET_TEXT_BY_ALIAS LANGUAGE
language ID alias NR '0001' TEXT INTO alias_text.
endmethod.
******************************************************
If I check the variables in the debugger, I can see that language and alias are filled correctly but after the operation (when the cursor of the debugger stands at the endmethod) the alias_text is still empty.
I filled the alias_text manually in the debugger (Typing a value 'testerrormsg' in it). And it worked. The testerrormsg appeared at the screen.
Why has not the alias_text filled properly?
Edited by: Robert Karlovic on Dec 21, 2007 10:49 AM
The 2. problem has been solved.
The parameters of the get_text method are case-sensitive.
Instead of
MESSAGE = cl_bsp_get_text_by_alias=>get_text( alias = 'y_abap_demo/errstart' language = sy-langu ).
I should have used
MESSAGE = cl_bsp_get_text_by_alias=>get_text( alias = 'Y_ABAP_DEMO/ERRSTART' language = sy-langu ).
@Raja: I have tried the sotr_edit but there is also a problem:
When I select an alias in the original language (German), I can display and change it.
But when I select the same alias with a different language (e.g. English), I get a popup message that there is no entry found when trying to display or change the alias. When I hit the create-button I get an error-message "The alias name already exists".
How can I add another language to an alias with the sotr_edit?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your issue is resolve, please close & reward the thread.
Raja T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Raja,
the problem has not been solved.
The se63 should look like this:
https://weblogs.sdn.sap.com/weblogs/images/2538/display_otr_2.gif
My se63 looks like this:
http://www.bilder-hoster.net/index.php?act=1&img=se6318578
What do I have to input at the object name to edit my otr(y_package/myotr)?
#1. in SE63, follow the pass: Translation>Abap Objects>Shot texts. In pop up click on " OT OTR". Here you can see the screen for tranlation. You can also use Tcode SOTR_EDIT, here you can create the translation, change the OTR.
#2. Try using below code
<i>CALL METHOD CL_BSP_RUNTIME=>GET_OTR_TEXT
EXPORTING
ALIAS = 'y_abap_demo/errstart'
RECEIVING
TEXT = MESSAGE.</i>
Raja T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.