How can I change the program header in sap abap? - abap

I want to change the header name of the ABAP program. What can I do or where can I find the option to edit the header?

Two ways for this:
Set it in program options. Select the program and check menu Goto / Attributes.
Or you can create a GUI title and set it via ABAP. This overwrites attributes' setting.
More about how to achieve: here.

To change the program header is more easier than it seems.
Just open you program via SE38 -> Goto -> Properties -> Check the title field and change -> Save
And you are done. :)

I have this.
Usually is changing the name in atributes with transaction se38, but sometimes this don't work, you need in the transaction se80, create a title GUI, if yuou don't have a title created, righ clic in the program name, create -> GUI title.
And put your name and code.
and in your program (se38) in PBO, you have to call the title with
SET TITLEBAR '100' (Put your title code)
(100 is the title code), but this instruction have to need inside of a moodle, if is outside don't will work.
I use the first moodle that i have in my PBO (i don't know if is the best decition or the right form, but is a way and works).
finally the title change

The path is SE38 -> (Put Program Name) -> Now open the program in edit mode -> Select the option GOTO -> select Properties Change the program title.

Related

InteliJ - How to create shortcuts for code samples

I am using InteliJ and really love using it. One of the questions I have is this:
Is there a way to create code short cuts?
For instance, while bug testing, I am forever writing:
<?php die(var_dump($var)); ?>
and figured it would be great to have a shortcut key to automate this. i.e.
"Cmd Option D"
or something similar to dump the pre-defined statement into my code...
Any thoughts on this?
You can use Live Templates:
To define a template go to Settings/Live templates, then select group or create new group of templates and hit the green plus button and select Live Template.
In the abbreviation field type for example vd which will be the trigger for your snippet, define context, which represents the languages this template will be available for and put this in the Template Text field:
<?php die(var_dump($SELECTION$)); ?>
The $SELECTION$ part is a variable which represents current selection.
Now when you are in editor, you can just type vd and hit Tab. That will expand your snippet and put your cursor inside var_dump().
You can event type the variable name you want to dump, select it, hit CTRL+ALT+T, which will show you a Surround with dialog, where you can choose your template. After you select it your variable name will be surrounded with the var_dump snippet.
Another way to invoke a live template is to hit CTRL+J which will show you autocomplete popup with the available templates.

ClearAll["Global`*"] automatic insert

I don't know where to find and adjust the configuration file to have Mathematica insert ClearAll["Global`*"]
at the beginning of every new notebook. How can I do this, rather than having to type it everytime I open a new notebook?
AFAIK there is no way to change the default new Notebook. But it is possible to add custom keyboard shortcut and/or menu command which will create new Notebook which will contain whatever you need. For example, you can add menu item "New my Notebook" under the "File -> New" submenu and assign Ctrl+Shift+N keyboard shortcut to evaluate it (this modification will only persist during current FrontEndSession) by evaluating the following (taken from here and here):
FrontEndExecute[
FrontEnd`AddMenuCommands[
"New", {MenuItem["My new Notebook",
System`KernelExecute[
CreateDocument[ExpressionCell[Defer#ClearAll["Global`*"], "Input"]]],
FrontEnd`MenuKey["N", FrontEnd`Modifiers -> {"Control", "Shift"}],
System`MenuEvaluator -> Automatic]}]]
Now pressing Ctrl+Shift+N will open new Notebook window with "Input" cell already containing ClearAll["Global`*"]. If you replace FrontEnd`Modifiers -> {"Control", "Shift"} with FrontEnd`Modifiers -> {"Command"}, the keyboard combination will be Alt+N.
Information on how to make this change permanent can be found in this MathGroups post:
You can completely reset the menus using...
FrontEndExecute[FrontEnd`ResetMenusPacket[{Automatic}]]
You'll get some ugly flicker, but that would work. You can also put
the AddMenuCommands function in a front end init.m which can be found
someplace on the path specified in the ConfigurationPath option. In
that case, the init.m file will get executed by the FE as it starts,
not the kernel, and so it won't matter how many kernels you start or
quit.
So you need to create the init.m file in one of the paths given by the ConfigurationPath option:
Options[$FrontEnd, ConfigurationPath][[1, 2]]
{FrontEnd`FileName[{$InstallationDirectory, "Configuration", "FrontEnd"}],
FrontEnd`FileName[{$UserBaseDirectory, "Autoload", _, "Configuration", "FrontEnd"}],
FrontEnd`FileName[{$BaseDirectory, "Autoload", _, "Configuration", "FrontEnd"}],
FrontEnd`FileName[{$InstallationDirectory, "AddOns", "Autoload", _, "Configuration", "FrontEnd"}]}
Some of these paths contain blank (_) which is undocumented but seemingly means any name (I have not not checked this).
Another way to make this change permanent is to edit your MenuSetup.tr file, but it is not recommended.
P.S. I recommend you in future to ask your Mathematica-related questions on dedicated site, where they will receive more attention:
https://mathematica.stackexchange.com/

Fixed text when scrolling

My program displays an ABAP list, I'm trying to show a header (some lines of text, nothing fancy) fixed when scrolling down in a report.
Is there some kind of tag or declaration that I have to use?
In SE38 you can define list heading with 'GOTO -> Text Elements -> List Headings`.
You can define a list header, and titles for your list (Columns heading).
One advantage: With GOTO -> Translations you can define different texts in different languages.
Another way to get this maintenance screen:
From your list, you can choose: System -> List -> List Header.
Another way:
You can use top-of-page to define your header text inside your report code.
top-of-page.
write 'My header'.
You can use the TOP OF PAGE event to write something that will stick at the top of the page while scrolling. You can find more info here.
You can also use the list headers from Text Elements menu. More info here.
Best regards,
Sergiu
One way is directly using top-of-page in your code.
Other way is calling reuse_alv_grid_display or reuse_alv_list_display (depending on your output type) and declaring "top-of-page" in the I_CALLBACK_TOP_OF_PAGE line. Then create a sub-routine with the same name as your "top-of-page". In that you can write
wa_list-typ = 'H'.
wa_list-info = ''.
APPEND wa_list to it_list.
clear wa_list.
OR
wa_list-typ = 'A'.
wa_list-info = 'Report Header'.
APPEND wa_list to it_list.
clear wa_list.
OR
wa_list-typ = 'S'.
wa_list-info = 'Report Header'.
APPEND wa_list to it_list.
clear wa_list.
depending on what you want (header, action or selection).
Finally you can use REUSE_ALV_COMMENTARY_WRITE function and call the table(in this example it_list).
Hope it helped.

Change parameter name on selection screen to a real text

I'm trying to replace the parameter name shown on the selection screen.
For example I have:
PARAMETERS pa_age TYPE age_type DEFAULT '18'.
It shows PA_AGE on the screen.
How to change it to How old are you? for instance?
You have to define a text via Goto->text elements->selection text.
If you develop in another language as you execute your code, you need also a translation.
Via menu Goto->Text Elements->Selection Text.

How to disable region collapsing or expand ALL regions in Visual Studio VB.NET?

In Visual Studio C# (2008), Ctrl+M+L expand all the regions.
There's also a setting in menu:
Tools -> Options -> Text Editor -> C# -> Advanced
to not collapse during file open. I see no equivalents in VB.NET.
Is there a way to expand all the regions, not just the one which has focus in VB.NET?
Or a macro or add-in that does it? I just hate not being able to see all the code.
In Visual Studio 2012 and 2013 there is an option for deactivating collapsing (called 'outlining mode').
You can find it under:
Text-Editor->Basic->VB Specific
and then uncheck "Enable outlining mode".
But you will then lose the feature for collapse/expand at all.
If you are willing to remove regions you can try this:
Ctrl+F
Quick Replace
Find Options
Use: Regular Expressions
Find What:
^\s*#(end)?region.*$
Replace with:
[leave replace box empty]
Explanation:
^ - Match the start of a line
\s* - Match zero or more whitespace characters
# - Match one # character
(end)? - Optionally match the string end
region - Match the string region
.* - Match zero or more of any other characters
$ - Match the end of the line
This will effectively find all #region or #endregion lines, whether they are indented or not, and whether they have description text after them or not.
In the Edit Menu, the Outlining submenu, you have all the options. Including Toggle All Outlining (Ctrl+M+L by default).
Maybe your key mappings were altered.
If you so desire, you can even select menu:
Edit -> Outlining -> Stop Outlining
In VB.Net, do a Search and Replace and select Use Hidden and Use Regex:
Replace:
^.*\#(end)*(:Wh)*region.*\n
With:
I wrote an extension to do this (and more), and it works for VB and C#. See this answer for more info:
Hiding the regions in Visual Studio
Once I changed:
#Region Form Level Events
#End Region
To (note the addition of quotes):
#Region "Form Level Events"
#End Region
The minus signed appeared and I was able to collapse/expand Regions.
That's pretty odd. The default profile settings for VB.Net and C# should bind the outlining functions to Ctrl+M, Ctrl+L combos.
It's possible that your profile is in a weird state. Try resetting your profile to VB.Net settings and see if that fixes the problem.
Tools → Import / Export Settings → Reset All Settings → VB.Net Profile
I came up with this trick:
Ctrl+F
Quick Replace
Find:
#Region
Search in: current document (or entire project or wherever you need to expand regions)
Search in hidden text
Then press Return and keep it pressed until VS notify the search is endend.
As a result all your '#region's have been expanded in very few seconds.