ITeye博客

ABAP

共 56 篇文章

DISABLE button(FCODE) from the GUI-Status

Goto-> Attributes->Pushbutton assignment select 'Display All' for inactive function

2014-08-04 15:54 · ABAP

Handy SAP function module to automate user events

*Begin-Auto triggers ENTER command CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE' EXPORTING functioncode = 'ENTER' EXCEPTIONS function_not_supported = 1 OTHERS = 2. *End-Auto triggers ENTER command Similarly we can work around with standard function codes (viz.,SAVE,EXECUTE etc.) and custom function codes…

2013-11-28 09:49 · ABAP

set Billing block to blank for Sals Order

FM: SD_WF_ORDER_DEL_BILLING_BLOCK

2013-04-17 15:16 · ABAP

set Billing block to blank for Sals Order

FM: SD_WF_ORDER_DEL_BILLING_BLOCK

2013-04-17 15:16 · ABAP

Unpermitted combination of business object BUS2032 and sales doc. category H

Q: create New Sales Order using BAPI: BAPI_SALESORDER_CREATEFROMDAT2, but get the error message:Unpermitted combination of business object BUS2032 and sales doc. category H. A:This is a shortcoming of this BAPI. If you look into the coding you will see that it call SD_SALESORDER_CREATE with restric…

2013-01-25 14:20 · ABAP

Function Module: get all users who have specific role

CALL FUNCTION 'RSRA_USERS_OF_AGR_GET' EXPORTING i_agr_name = role TABLES activity_groups_users = lt_agr_users EXCEPTIONS no_user_available = 1 OTHERS = 2.

2013-01-25 14:16 · ABAP

Create a SELECT-OPTIONS in a module pool screen

source:http://abap-explorer.blogspot.com/2008/08/create-select-options-in-module-pool.html Create a SELECT-OPTIONS in module pool screen using two methods as shown. Method 1 a) Create a subscreen area in your screen layout where you want to create the select options. b) In the top include of your m…

2012-03-07 15:35 · ABAP

Calculate the days, months and years between 2 dates.

FORM compute_2date_diff. DATA: lv_date1 LIKE sy-datum, lv_date2 LIKE sy-datum, lv_month TYPE pea_scrmm, lv_days TYPE pea_scrdd. *lv_date1 must be greater than lv_date2 lv_date1 = '20120201'. lv_date2 = '20120101'. CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES' EXPORTING date1 = lv_date1 date2 = lv_date2 OUT…

2012-02-21 16:14 · ABAP

Retrieving Domain fixed values

source:http://www.saptechnical.com/Tips/ABAP/Domain/FixedValues.htm The F4 for screen field can be fetched either through value table, explicit F4 help or through fixed values associated with the domain. Sometimes there might be a requirement to fetch the fixed values associated with a domain. Data…

2012-02-16 11:13 · ABAP

If 1 equals 2, what’s the purpose?

source:http://sapport.blogspot.com/2010/03/if-1-equals-2-whats-purpose.html While debugging standard SAP ABAP code you might find for first look very strange code like following: If 1 EQ 2. MESSAGE W001(z100). plus do something else EndIf. Confusing? Of course! Based on the math this statement cann…

2012-02-16 10:59 · ABAP

get status name for batch input session

Line 601 in program SAPMSBDC_CC loop at itab_apqi. case itab_apqi-qstate. when ' '. call function 'ICON_CREATE' exporting name = icon_create info = 'neu'(036) importing result = itab_apqi-status exceptions others = 1. if sy-subrc <> 0. itab_apqi-status = icon_status_ok. endif. itab_apqi-status_text…

2012-01-31 14:47 · ABAP · BDC

create zip folder with cl_abap_zip

REPORT ztest. DATA: gv_file_length TYPE i, gv_filehexcontent TYPE xstring, gv_zipfilehex TYPE xstring, gt_filebincontent TYPE solix_tab, gt_zipfilebin TYPE solix_tab, gv_zipfilename TYPE string, gv_folder TYPE string, go_zipper TYPE REF TO cl_abap_zip, gt_files TYPE TABLE OF char255 WITH HEADER LIN…

2011-12-05 18:11 · ABAP

MIRO

from: http://help-sap.blogspot.com/2011/01/miro.html, http://space.itpub.net/9859323/viewspace-684596 If you want to mimic the quantity shown in MIRO (transaction) while posting incoming invoice, you need to use the following function module CALL FUNCTION 'MRM_ASSIGNMENT' EXPORTING i_display = v_di…

2011-11-29 10:39 · ABAP

Create Vendor or Customer_master Data

To Create or Change Vendor_master date(XK01,XK02) or Customer Master date (XD01,XD02) Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See note 384462 Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API (Customer) and VM…

2011-11-23 16:22 · ABAP

Pay attention to the following points when using append structures

You cannot create append structures for pool and cluster tables. If a table contains a long field either of the data type, LCHRor LRAW, you cannot expand the table with an append structure. This is because long fields of this type must always be the last fields in their respective tables. No fields…

2011-10-27 13:43 · ABAP

Help Views

source:http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ecd2446011d189700000e8322d00/content.htm You have to create a help view if a view with outer join is needed as selection method of a search help. The selection method of a search help is either a table or a view. If you have to select data f…

2011-10-20 10:46 · ABAP

What is the Different Types and Usage of Views

source:http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm The followings are different types of views: Database View (SE11) Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the correspondin…

2011-10-19 23:06 · ABAP

Upload a Comma Delimited CSV file that contains commas in data

source:http://wiki.sdn.sap.com/wiki/display/Snippets/Upload+a+Comma+Delimited+CSV+file+that+contains+commas+in+data Some Comma Delimited CSV files will contain commas in the data fields and this causes problems in loading the file into our system. I don't think there is a standard function module t…

2011-09-23 17:22 · ABAP

What is the difference between SET SCREEN and CALL SCREEN ?

source:http://www.saptechies.com/what-is-the-difference-between-set-screen-and-call-screen With SET SCREEN , the current screen simply specifies the next screen in the chain. control branches to this next screen as soon as the current screen has been processed. Return from next screen to current sc…

2011-09-19 21:50 · ABAP · Dynpro

cl_gui_frontend_services=>file_open_dialog

CALL METHOD cl_gui_frontend_services=>file_open_dialog EXPORTING window_title = 'Select CSV file' file_filter = 'CSV File|*.CSV' CHANGING file_table = l_files rc = l_rc. IF l_rc ne -1. LOOP AT l_files INTO l_file. p_path = l_file. ENDLOOP. ENDIF.

2011-09-09 09:21 · ABAP