Thursday, 20 November 2014

Popup message log

 

Step 1 : Call Function 'BAL_LOG_CREATE'

Step 2 : Call Function 'BAL_LOG_MSG_ADD'

Step 3 : Call Function 'BAL_DSP_PROFILE_POPUP_GET'

Step 4 : Call Function 'BAL_DSP_LOG_DISPLAY'

Step 5 : Delete message Call Function 'BAL_LOG_MSG_DELETE_ALL'

Tuesday, 4 November 2014

Generated Table for View

Table : TRDIR

ใช้สำหรับเช็คข้อมูลโปรแกรม คลาส ฟังก์ชั่น ฯลฯ ว่าใครเป็นคนสร้าง สร้างเมื่อไหร่ ที่ไหน เป็นต้น

Monday, 27 October 2014

Find domain and value type

 

Table : DD07V

Ex. Find data element days.

image

image

go to SE11.

image

image

Click Where used list  image

and choose data elements.

Wednesday, 22 October 2014

Change value float to quantity


Question 2.4356510000000000E+06 to 243,651.00
Answer set field catalog
edit_mask = '==FLTQU'.
convexit = 'FLTQU'.

Dynamic User Setting

 

----Set current screen for user.----

 

REPORT  y_test.


tables esdus.


DATA: x TYPE i,
      y TYPE i.
data tab type LVC_s_COL.
data tab2 like table of tab.
data gs_comp      TYPE ref to CL_ABAP_TYPEDESCR.
data po type ebeln VALUE '4052001347'.
data item type ebelp VALUE '00110'.
DATA: l_display_only type c value 'X'.
data a(10) type c.
export i_display_only = l_display_only to MEMORY ID
'ME_DISPLAY_ONLY'.


START-OF-SELECTION.


set PARAMETER ID 'BES' FIELD po.
set PARAMETER ID 'BSP' FIELD item.
set PARAMETER ID 'BEP' FIELD item.
SET PARAMETER ID 'EFB' field '08'.
esdus-uname = sy-uname.
esdus-Action =  'PurchaseOrder'.
esdus-Element = 'item_view           SUBVIEW_INDEX'.
esdus-ACTIVE = '13'.
update esdus.


call TRANSACTION 'ME22N'  .
write / a .

Ex. Call Transaction using BDC


DATA: bdcdata TYPE TABLE OF bdcdata,
          wa_bdcdata TYPE bdcdata,

 
REFRESH bdcdata.
  wa_bdcdata-program  = 'CHRG'.
  wa_bdcdata-dynpro   = '1501'.
  wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO bdcdata.
PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTR'.

SET PARAMETER ID 'MAT' FIELD 'RM-AL7075-RB-AS002'.
SET PARAMETER ID 'CHA' FIELD 'MA0120058%'.
CALL TRANSACTION 'MSC3N' USING bdcdata[]  MODE 'E' .

 
FORM bdc_field USING fnam fval.
IF fval <> space.
CLEAR wa_bdcdata.
    wa_bdcdata-fnam = fnam.
    wa_bdcdata-fval = fval.
APPEND wa_bdcdata TO bdcdata.
ENDIF.




Ex. Submit call screen

 

DATA rspar TYPE TABLE OF rsparams WITH HEADER LINE.

"Get all value on screen
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
      curr_report           = sy-repid
*  IMPORTING
*    SP                    =
TABLES
      selection_table       = rspar .

IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.


“additional value

rspar-selname = 'JOBCOUNT'.
  rspar-kind    = 'P'.  “P = parameter , S = Select option
  rspar-sign    = 'I'.
  rspar-option  = 'EQ'.
  rspar-low     = ‘1’.
APPEND rspar.

 

"Submit Program
SUBMIT (program_name) 
AND RETURN
WITH SELECTION-TABLE rspar

 

Transaction Recorder

 

Tcode : SHDB

image

MIGO: Call Transaction

 

CALL FUNCTION 'MIGO_DIALOG'
EXPORTING
            i_action            = 'A04'
            i_refdoc            = 'R02'
            i_notree            = 'X'
            i_no_auth_check     = ' '
            i_deadend           = 'X'
            i_skip_first_screen = 'X'
            i_okcode            = 'OK_GO'
            i_mblnr             = w_output-mblnr
            i_mjahr             = w_output-mjahr
            i_zeile             = w_output-zeile.

Monday, 20 October 2014

ESDUS : Dynamic User Settings

 

Table ESDUS

ใช้เก็บค่าตำแหน่งการเลือกต่างๆของ Screen ของแต่ละ User

เช่น ตำแหน่งการเลือกของ Tree, ตำแหน่งการเลือกของ Tabstrip เป็นต้น

Sunday, 19 October 2014

Ex. Create data type handle

 

INPUT_TAB    Importing    Type    ANY TABLE
OUTPUT_TAB    Changing    Type    INDEX TABLE

-------------------------------------------------------------------------------------------------------

DATA: output_field TYPE REF TO cl_abap_tabledescr,
        output_line TYPE REF TO data,
        out_linetype TYPE REF TO cl_abap_datadescr.
FIELD-SYMBOLS: <flinein> TYPE ANY, <flineout> TYPE ANY.

  output_field ?= cl_abap_tabledescr=>describe_by_data( output_tab ).
  out_linetype = output_field->get_table_line_type( ).
CREATE DATA output_line TYPE HANDLE out_linetype.
ASSIGN output_line->* TO <flineout>.


LOOP AT input_tab ASSIGNING <flinein>.
CLEAR <flineout>.
MOVE-CORRESPONDING <flinein> TO <flineout>.
APPEND <flineout> TO output_tab.
ENDLOOP.

Wednesday, 15 October 2014

Error Transport in QAS; cannot connect


Symptom:

sap error XT200 Return code: 0232

Clause:

Oracle User is locked

SQL> connect sapqas/ccsqasadm
ERROR:
ORA-28000: the account is locked

Warning: You are no longer connected to ORACLE.
SQL> connect /
Connected.
SQL> ALTER USER sapqas ACCOUNT UNLOCK;
ALTER USER sapqas ACCOUNT UNLOCK
*
ERROR at line 1:
ORA-01031: insufficient privileges

Solution:

1)  Unlock Oracle  user
SQL> connect /as sysdba
Connected.
SQL> ALTER USER sapqas ACCOUNT UNLOCK;
User altered.
SQL>
2) Change Oracle User Password
brconnect -u / -f chpass -o sapsr3 -p <password>

Tuesday, 30 September 2014

How to create project : SPRO

 

1. Go to transaction : SPRO

image

 

2. Select Menu [Go to > Project Management]

image

 

3. Click Create Project and input project name.

4. Click button “Change selection…” and Select components.

image

5. Click button “Generate Project IMG” and Save.

Thursday, 18 September 2014

How to SECATT

 

1. Go to transaction “SECATT”

image

2. Create Script

2.1 Check Test Script and input script name.

2.2 Click button image

3.

image

4.

image

5.

image

6. Create Parameter name in VALIN.image

6.1 Select Import and click Yes.

image

7. Save Script.

8. Run Script.

8.1 Check Test Configuration and input script name.

8.2 Click button image

image

9. Set value and save.

image

image

10. Click Download Variants.

11. Input data on excel.

image

12. Execute and set start mode.

image

13. Input path and execute.

image

Tuesday, 19 August 2014

Error : Unable to open module file

 

 

Description

When we try opening an existing solution, every project inside this solution has the following error: Unable to open module file 'C:\Users\USER123\AppData\Local\Temp\2\.NETFramework,Version=v4.0.AssemblyAttributes.vb': System Error &H80070002& C:\Users\USER123\AppData\Local\Temp\2\.NETFramework,Version=v4.0.AssemblyAttributes.vb

 

 

This issue is still happening with VS2012 as well.
Steps to reproduce:

1. Create a project/application using .NetFramework 4.5
2. Close VS2012
3. Navigate to Temp Folder (C:\Users\xxxxx\AppData\Local\Temp)
4. Delete the .NETFramework,Version=v4.5.AssemblyAttributes.vb file
5. Restart VS2012 and Start debug.

 

 

URL : https://connect.microsoft.com/VisualStudio/feedback/details/515041/unable-to-open-module-file-when-an-existing-solution-is-loaded

Thursday, 24 July 2014

How to changing default collation of SQL Server



image

1. Now open command prompt as Administrator user and navigate to the Setup.exe on installation media or local copy of setup.exe. In default installation setting; you’ll find this file here: (ตำแหน่งของไฟล์ Setup โปรแกรม SQL Server)
image

2. Next the command you want to run has following syntax:
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=<Your Instance Name> /SQLSYSADMINACCOUNTS=<Your SQL SYS Admin account> [ /SAPWD=<Password> ] /SQLCOLLATION=<Your New SQL Collation name>

Ex. setup /QUIET /ACTION=RebuildDatabase /INSTANCENAME=”SQLEXPRESS” /SAPWD=”password user sa” /SQLCOLLATION=”SQL_Latin1_General_CP1_CI_AS” /SQLSYSADMINACCOUNTS=”user admin on PC”

3. Hit enter and you are done.


URL : http://www.carryoverbit.com/changing-default-collation-of-microsoft-sql-server-2012/

Tuesday, 15 July 2014

Linked Server

 

Linked Server in SQL Server Management Studio.

image

 

Ex. Select Query

select * from [SAPDEV]..[SAPDEV].[ZHST_MID]

 

Ex. Insert Query

INSERT into  OPENQUERY (SAPDEV, 'select * from SAPDEV.ZHST_MID')
values ('210','M002','Test','TT',' ',' ',' ')

INSERT OPENQUERY (OracleSvr, 'SELECT name FROM joe.titles')
VALUES ('NewTitle')
 
Ex. Update Query

UPDATE OPENQUERY (OracleSvr, 'SELECT name FROM joe.titles WHERE id = 101') 
SET name = 'ADifferentName'
 
Ex. Delete Query

DELETE OPENQUERY (OracleSvr, 'SELECT name FROM joe.titles WHERE name = ''NewTitle''')

Monday, 30 June 2014

SAP Enhancements



Using SMOD you can search for enhancement and there component. Components includes Function Exit, Function Codes, Program,Calling Screen...so basically all exits.
CMOD allows you to create Project for your enhacement. In order to activate every exit code you need to create a project for same and activate it...Eventhough if you write a code and do not create a project for same your exit code will not reflect.

Ex. SMOD
image

Ex. CMOD
image

Friday, 27 June 2014

SAP Barcode


Location File .exe
\\SVSAPAPP01\CCSSAPAddon

Location VB.Net
\\SVSAPAPP01\IT_App\VB

Program Barcode in SAP se80
ZSD_BARCODE_AXCELIS