SAP KD

Archives

BC – ABAP Archive

July 22, 2010 @ 4:45 pm

Powerfull SAP ABAP Functions

Bp_event_raise

  • Trigger an event from ABAP/4 program.

Bp_joblog_read

  • Fetch job log executions filling the structure TBTC5.

G_set_get_all_values

  • Fetch values from a set filling the structure RGSB4.

Popup_to_confirm_loss_of_data

  • Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.

Popup_to_confirm_step

  • Create a dialog box in which you make a question whether the user wishes to perform the step.

Popup_to_confirm_with_message

  • Create a dialog box in which you inform the user about a specific decision point during an action.

Popup_to_confirm_with_value

  • Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.

Popup_to_decide

  • Create a dialog box in which you require the user between the two processing alternatives, or to cancel the action.

Popup_to_decide_with_message

  • Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.

Popup_to_display_text

  • Create a dialog box in which you display a two-line message.

Rfc_system_info

  • Fetch information from the current instance filling the structure FRCSI.

Rs_send_mail_for_spoollist

  • Send messages from ABAP/4 programs to SAPoffice. The structure SOLI may contain the message.

Rzl_sleep

  • Hang the current application from 1 to 5 seconds.

Rzl_submit

  • Submit a remote report.

Sapgui_progress_indicator

  • Set progress indicator on the left lower corner of the current window.

Sd_print_terms_of_payment

  • Format terms of payment according to base line date and payment terms.

So_wind_spool_list

  • Browse printer spool numbers according to user informed.

So_spool_read

  • Fetch printer spool according to the spool number informed.

So_user_list_read

  • List of all users filling the structure SOUD3.

Spell_amount

  • Return the amount in words filling the structure SPELL.

Th_saprel

  • Gather information from the current system including upgrade activities. It completes fields from the structure KKS03.

Th_server_list

  • Gather information of all instances filling the structure MSXXLIST.

Th_user_list

  • List of logged users filling the structure UINFO.

Th_user_info

  • Information about the current user. It completes fields from the structure KKS03.

Th_wpinfo

  • List of work processes filling the structure WPINFO.

Ws_upload

  • Transfer files from the frontend to the application server.

Ws_download

  • Transfer files from the application server to the frontend.

Ws_excel

  • Download files at the frontend in excel format.

Ws_execute

  • Execute an external program on the presentation server.

Ws_file_delete

  • Delete file at the frontend.

Ws_volume_get

  • Get the label from a frontend device.

Ws_msg

  • Create a dialog box in which you display an one-line message.
VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Filed under BC - ABAP · No Comments »

July 20, 2010 @ 1:37 pm

Upload Graphics to SAPSCRIPT

You can upload graphics to sapscript with reportRSTXLDMC, however, you can only upload .tif on pc files.

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Filed under BC - ABAP, Tips · No Comments »

May 26, 2010 @ 3:38 pm

Send a pop-up message to an user

Do you wish to send an anonymous message to a user, that is currently log on in your system?

You can use function module TH_POPUP. Just enter the system client, the target user and your message, and execute it, for example, in SE37 t-code.

Your target user will receive a pop-up window in his computer, with your message.

Just try it :)

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Filed under BC - ABAP · No Comments »

April 15, 2010 @ 9:31 am

Calculating working day

Have you ever need to get the next/previous working day, of a calendar date, of a factory calendar?

We suggest function module DATE_CONVERT_TO_FACTORYDATE.

You can indicate with ‘+’ or ‘-’ on importing parameter CORRECT_OPTION if you want the next working day, or the previous one. The other importing parameters are the calendar date you want to use, and the factory calendar.

The result will be in exporting parameter DATE.

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Filed under BC - ABAP · No Comments »

March 30, 2010 @ 4:49 pm

Date and Time validation

Sometimes,  we need to validate some inputs from users that are inserted by external sources (like files).

For this purpose, we found very useful function modules like CONVERT_DATE_TO_INTERNAL and CONVERT_TIME_INPUT to validate external dates formats and external times formats (ex: dates like ’24.06.1978′ or times like ’11:00:00′)

This functions are also very useful to convert the external information to internal information.

If you need more conversions of this kind, take a look at utility class CL_ABAP_DATFM.

Check if is helpful for you too, or if you have any other suggestions feel free to share with us!

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Filed under BC - ABAP · No Comments »

March 29, 2010 @ 4:13 pm

Difference between KOBED and KOBEV

In pricing there are requirements, and inside this requirements there are 2 forms, KOBED and KOBEV.

What’s the difference between them?

KOBED – This is called at header and item level

KOBEV – Used for header level

Use KOBEV if you only need header changes. If you use KOBED and only need header data your performance may not be the best!

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Filed under BC - ABAP, SD, Tips · No Comments »

March 26, 2010 @ 12:15 am

Hide functions in reports

Have you ever need that your program don’t show the execute button, or background execution option, or even the variant selection option?

You can do it but declaring this info:

REPORT bla bla bla.

….
*- Data declaration
DATA gt_exclude                TYPE TABLE OF rsexfcode.
DATA gs_exclude                TYPE rsexfcode.

INITIALIZATION.
*- Hide options
gs_exclude-fcode  = ’ONLI’. ”Hide execute
APPEND gs_exclude TO gt_exclude.
gs_exclude-fcode  = ’PRIN’. ”Hide Print+Execute
APPEND gs_exclude TO gt_exclude.
gs_exclude-fcode  = ’SJOB’. ”Hide Execute in backgroun
APPEND gs_exclude TO gt_exclude.
gs_exclude-fcode  = ’GET’. ”Hide Call variant
APPEND gs_exclude TO gt_exclude.
gs_exclude-fcode  = ’VSHO’. ”Hide Show variant
APPEND gs_exclude TO gt_exclude.
gs_exclude-fcode  = ’VDEL’. ”Hide Delete variant
APPEND gs_exclude TO gt_exclude.
gs_exclude-fcode  = ’SPOS’. ”Hide Save as Variant
APPEND gs_exclude TO gt_exclude.

*- Do it!
CALL FUNCTION ’RS_SET_SELSCREEN_STATUS’
EXPORTING
p_status  = ’%_00′
p_program = sy-repid
TABLES
p_exclude = gt_exclude.

VN:F [1.9.3_1094]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Filed under BC - ABAP · 1 Comment »

March 18, 2010 @ 10:35 am

How to Debug a Job in SAP?

This is a problem that happens a lot of times, how to know what a job is doing by debug?

  1. Transaction SM37;
  2. Select the Job;
  3. In the OK-CODE field write JDBG;

If you have any other solution for this problem feel free to comment and help other readers

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Filed under BC - ABAP, Tips · No Comments »

August 12, 2009 @ 2:38 pm

Edit Tables Directly in SE16 by Using SE16N

If you need to edit one table directly without using one SM30 view do these steps:

Go to SE16N;
Insert table name, press enter;
In transaction box on top write “&SAP_EDIT” and press enter;
Press F8 and insert line and delete line button will be available.

Please be very carefull when doing this, it may damage the entire system and create inconsistencies in the database causing, only use if you know what you are doing.

VN:F [1.9.3_1094]
Rating: 4.5/5 (4 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 2 votes)

Filed under BC - ABAP, Tips · No Comments »

August 6, 2009 @ 11:02 am

Default Values for Sales Order by User

Sometimes you need to assign default values to one user when entering the sales order.

Todo so go to SU01, enter user, click modify and click parameters.

Here you have:

PID                    Parameter                  Short Description
AAT                         ZOR                               Order Type
SPA                         0001                               Division
VKO                           03                         Sales Organization
VTW                          01                         Distribution Channel

VN:F [1.9.3_1094]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Filed under BC - ABAP, SD · No Comments »

About

The absolute best damn Wordpress Gallery on the net. ArenaWP is the sandbox for various designs by Terry Ng of Kineda.
Read More

Social

Subscribe by email:

Delivered by FeedBurner

Pages

  • Loading...


    Loading...

    Login






    Register | Lost password?



    Register





    A password will be mailed to you.
    Log in | Lost password?

    Retrieve password





    A confirmation mail will be sent to your e-mail address.
    Log in | Register
  • Calendar

    July 2010
    M T W T F S S
    « May    
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  

    Sap Websites

    Recent Posts

    Categories

    Disclaimer

    SAP and the SAP logo are registered trademarks of SAP AG. SAPKD.com is a personal blog and is not affiliated with SAP or other companies mentioned here. I capture the things I learn that might be helpful to others here. No warranties on the information provided are offered or implied. Please feel free to use at your own risk