Tag Archive for 'SAP'

SAP: BDC Upload Program Template

I recently created my own BDC upload template that enables user to choose the processing mode, the update mode and options for Default Size, Continue After Commit, and Not a Batch Input Session easily.

Another good thing with this program is a functionality to generate an excel file template. The image below shows the actual screenshot.

I modified the SAP standard program BDCRECX1 and saved it as ZBDCRECX1. I used this for my BDC upload program instead of the standard BDCRECX1 include. You may download the source code of ZBDCRECX1 on the link below. I also included a sample upload program utilizing the ZBDCRECX1 include.

zbdc_template.zip

Enjoy coding! :)

SAP: How to activate SAP webgui

Below are the steps on how to activate webgui on SAP ECC 6.0:

1. Go to your Instance Profile parameter using tcode RZ10 and set the icm/server_port_0 parameter to PROT=HTTP,PORT=8000

2. Now go to transaction SICF and activate the following:
/sap/public/bc/its/mimes
/sap/bc/gui/sap/its/webgui

3. Run transaction SIAC_PUBLISH_ALL_INTERNAL to publish internet services.

4. Now browse to http://<servername>:<icmport>/sap/bc/gui/sap/its/webgui/

As simple as that, you can now use SAP webgui.

SAP: table JEST (Individual Object Status)

JEST table contains object status that is either system status or a user status. Field STAT corresponds to the Object Status. Field INACT identifies whether the status is currently active or inactive and field CHGNR is the change number that identifies the change documents for an object and is incremented serially.

TJ02 table contains the list of system status and description. All statuses in this table are internal. This means they are consistent across objects and clients. A single object can have multiple active system statuses and user statuses & inactive ones.

TJ30 table contains the list of user status and TJ30T contains their description.

You could use function module STATUS_READ read active object status and STATUS_OBJECT_READ to retrieve the status profile of an object number.

Creative Commons License

SAP: Customized Tcode for View Maintenance Screen

Instead of going to transaction code SM30 to maintain your table, why not create your own t-code for that specific table maintenance screen. To do this, here’s the step by step procedure I stumbled upon on some SAP technical forums:

1. Go to t-code SE93.
2. Type in your customized t-code on the transaction code field.
3. Click on Create button.
4. Give it a short description and tick on the “Transaction with Parameters” radio button.
2. On the next screen, type “SM30″ in the transaction field.
3. Check mark the skip initial screen.
4. type “0″ on screen field
5. Under the Classification area, check mark on Inherit GUI attributes
6. Tick all GUI support checkboxes.
7. On the default value section, give this:

Name of Screen Field: VIEWNAME
Value: Your table name

Name of Screen Field: UPDATE
Value: X X

Creative Commons License

SAP: Dynamic Sapgui Progress Indicator

It is very easy to apply a progress indicator on your abap programs. This will enable the

user to determine how much long will he wait until the program finish its processing.

This is done by simply calling the function module SAPGUI_PROGRESS_INDICATOR.

 
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
  EXPORTING
    VALUE(PERCENTAGE) DEFAULT 0
    VALUE(TEXT) DEFAULT SPACE

PERCENTAGE is where you indicate the percentage of processing time and the TEXT is

where you indicate the text to be displayed on the status bar. This parameters can be

set with static values. But if you want, you could also add a few line of codes to make your

progress indicator dynamic and based on the actual number of records being process. This tip

is applicable when you are querying and processing a record from a database.

First you have to declare three decimal variables, see example below.

 
DATA:   v_percent    TYPE p DECIMALS 4,	"holds the actual percentage of process time
        v_increment  TYPE p DECIMALS 4, "holds the increment value per single loop
        v_mod        TYPE p DECIMALS 4. "used as indicator

Now refer to the lines below for the rest of the codes.

 
****Your select statement goes here******
 
* this will determine the increment value based on the result of the select statement
  v_increment = 100 / sy-dbcnt.
 
  LOOP AT it INTO wa.
*calculate the progress percentage on every single loop
    v_percent = v_percent + v_increment.
 
*this codes indicates that I want to update my progress indicator every 5% increase
*in percentage. you can change this anytime you want.
    v_mod = v_percent MOD 5.
    IF  v_mod  < 1.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          percentage = v_percent
          text       = 'Processing, please wait.'.
    ENDIF.

Creative Commons License