CALL FUNCTION 'POPUP_TO_SELECT_MONTH'
EXPORTING
actual_month = ld_spmon
IMPORTING
selected_month = ld_spmon
return_code = ld_returncode
EXCEPTIONS factory_calendar_not_found = 01
holiday_calendar_not_found = 02
month_not_found = 03.
Thursday, August 4, 2011
Pop up window to select month
pop up message yes / no in ABAP
REPORT zpopup_menu_yesno.
DATA : ld_answer TYPE string.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
textline1 = 'POPUP MENU'
textline2 = 'Yes or No?!'
titel = 'Change Confirmation'
IMPORTING
answer = ld_answer.
IF ld_answer = 'J'.
WRITE : / 'Yes !'.
ELSE.
WRITE : / 'Oh, No !'.
ENDIF.
How to catch DUMP in ABAP
REPORT ZCATCHDUMPEXAMPLE.
PARAMETERS: p_file LIKE rlgrap-filename .
DATA: v_file TYPE string.
DATA: BEGIN OF itab OCCURS 0,
name(23) TYPE c,
END OF itab.
DATA: errormessage TYPE char50.
v_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
has_field_separator = ' '
TABLES
data_tab = itab.
RECEIVE RESULTS FROM FUNCTION 'GUI_UPLOAD'
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17 .
CASE sy-subrc.
WHEN 0.
errormessage = 'Data Loaded'.
WHEN 1.
errormessage = 'FILE_OPEN_ERROR'.
WHEN 2.
errormessage = 'FILE_READ_ERROR'.
WHEN 3.
errormessage = 'NO_BATCH'.
WHEN 4.
errormessage = 'GUI_REFUSE_FILETRANSFER'.
WHEN 5.
errormessage = 'INVALID_TYPE'.
WHEN 6.
errormessage = 'NO_AUTHORITY'.
WHEN 7.
errormessage = 'UNKNOWN_ERROR'.
WHEN 8.
errormessage = 'BAD_DATA_FORMAT'.
WHEN 9.
errormessage = 'HEADER_NOT_ALLOWED'.
WHEN 10.
errormessage = 'SEPARATOR_NOT_ALLOWED'.
WHEN 11.
errormessage = 'HEADER_TOO_LONG'.
WHEN 12.
errormessage = 'UNKNOWN_DP_ERROR'.
WHEN 13.
errormessage = 'ACCESS_DENIED'.
WHEN 14.
errormessage = 'DP_OUT_OF_MEMORY'.
WHEN 15.
errormessage = 'DISK_FULL'.
WHEN 16.
errormessage = 'DP_TIMEOUT'.
WHEN 17.
errormessage = 'OTHERS'.
ENDCASE.
MESSAGE e001(00) WITH errormessage .
PARAMETERS: p_file LIKE rlgrap-filename .
DATA: v_file TYPE string.
DATA: BEGIN OF itab OCCURS 0,
name(23) TYPE c,
END OF itab.
DATA: errormessage TYPE char50.
v_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
has_field_separator = ' '
TABLES
data_tab = itab.
RECEIVE RESULTS FROM FUNCTION 'GUI_UPLOAD'
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17 .
CASE sy-subrc.
WHEN 0.
errormessage = 'Data Loaded'.
WHEN 1.
errormessage = 'FILE_OPEN_ERROR'.
WHEN 2.
errormessage = 'FILE_READ_ERROR'.
WHEN 3.
errormessage = 'NO_BATCH'.
WHEN 4.
errormessage = 'GUI_REFUSE_FILETRANSFER'.
WHEN 5.
errormessage = 'INVALID_TYPE'.
WHEN 6.
errormessage = 'NO_AUTHORITY'.
WHEN 7.
errormessage = 'UNKNOWN_ERROR'.
WHEN 8.
errormessage = 'BAD_DATA_FORMAT'.
WHEN 9.
errormessage = 'HEADER_NOT_ALLOWED'.
WHEN 10.
errormessage = 'SEPARATOR_NOT_ALLOWED'.
WHEN 11.
errormessage = 'HEADER_TOO_LONG'.
WHEN 12.
errormessage = 'UNKNOWN_DP_ERROR'.
WHEN 13.
errormessage = 'ACCESS_DENIED'.
WHEN 14.
errormessage = 'DP_OUT_OF_MEMORY'.
WHEN 15.
errormessage = 'DISK_FULL'.
WHEN 16.
errormessage = 'DP_TIMEOUT'.
WHEN 17.
errormessage = 'OTHERS'.
ENDCASE.
MESSAGE e001(00) WITH errormessage .
Wednesday, August 3, 2011
An Example of a ListBox Program
REPORT ZLISTBOXPROGRAM.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST,
c(20) type c.
DATA:BEGIN OF itab OCCURS 0,
kunnr like kna1-kunnr,
name1 like kna1-name1,
END OF itab.
DATA:BEGIN OF jtab OCCURS 0,
kunnr like kna1-kunnr,
land1 like kna1-land1,
END OF jtab.
PARAMETERS: option(20) AS LISTBOX VISIBLE LENGTH 20
default 'SELECT'.
AT SELECTION-SCREEN OUTPUT.
NAME = 'option'.
VALUE-KEY = '1'.
VALUE-TEXT = 'Company'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Country'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
SELECT kunnr name1 UP TO 20 ROWS FROM kna1 INTO TABLE itab. SELECT kunnr land1 UP TO 20 ROWS FROM kna1 INTO TABLE jtab.
CASE option.
WHEN '1'.
LOOP AT itab.
WRITE:/ itab-kunnr,itab-name1.
ENDLOOP.
WHEN '2'.
LOOP AT jtab.
WRITE:/ jtab-kunnr,jtab-land1.
ENDLOOP.
ENDCASE.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST,
c(20) type c.
DATA:BEGIN OF itab OCCURS 0,
kunnr like kna1-kunnr,
name1 like kna1-name1,
END OF itab.
DATA:BEGIN OF jtab OCCURS 0,
kunnr like kna1-kunnr,
land1 like kna1-land1,
END OF jtab.
PARAMETERS: option(20) AS LISTBOX VISIBLE LENGTH 20
default 'SELECT'.
AT SELECTION-SCREEN OUTPUT.
NAME = 'option'.
VALUE-KEY = '1'.
VALUE-TEXT = 'Company'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Country'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
SELECT kunnr name1 UP TO 20 ROWS FROM kna1 INTO TABLE itab. SELECT kunnr land1 UP TO 20 ROWS FROM kna1 INTO TABLE jtab.
CASE option.
WHEN '1'.
LOOP AT itab.
WRITE:/ itab-kunnr,itab-name1.
ENDLOOP.
WHEN '2'.
LOOP AT jtab.
WRITE:/ jtab-kunnr,jtab-land1.
ENDLOOP.
ENDCASE.
Sunday, July 31, 2011
Useful Reports Tcode in SAP Financial Accounting
GENERAL LEDGER Information Systems 1. Structured Account Balances
(Balance Sheet & P&L Account in FS Version Format) S_ALR_87012279 2. GL Account Balances (Totals & Balances ) S_ALR_87012301 3. GL Line Items S_ALR_87012282 4. Statements for GL Accounts,
Customers & Vendors S_ALR_87012332 5. Document Journal S_ALR_87012287 6. Compact Document Journal S_ALR_87012289 7. Line Item Journal S_ALR_87012291 8. Display of Changed Documents S_ALR_87012293 9. Invoice Numbers assigned Twice S_ALR_87012341 10. Gaps in Document Number Assignments S_ALR_87012342 11. Posting Totals Document Type wise S_ALR_87012344 12. Recurring Entry Documents S_ALR_87012346 Master Data 13. Chart of Accounts S_AL:R_87012326 14. GL Account List S_AL:R_87012328 15. Display Changes to GL Accounts S_ALR_87012308 16. Financial Statement Version FSE2 CASH & BANK REPORTS 1. Check Information List FCH6 2. Check Register FCHN 3. Check Number Ranges S_P99_41000102 TAX REPORTS & REGISTERS 1. List of Internally generated
Excise Invoices J1I7 2. Capital Goods Transfer of Credit j2I8 3. List of GRs without Excise Invoice j1IGR 4. List of SubContract Challans J1IFR 5. CENVAT Register J2I9 (Monthly Return under Rule 57AE of the
Central excise Rules from which Monthly Return
under Rule 7 of the CENVAT Credit Rules 2001) 6. Registers : RG 23A/C Part I &II , RG1, PLA J1I5,J2I5,J2I6
ACCOUNTS RECEIVABLE Information Systems 1. Bill Holdings
(Bill of Exchange Receivable List with ALV facility) S-ALR_87009987 2. Customer Balances in Local Currency S_ALR_87012172 3. Customer Line Items S_ALR_87012197 4. Due Dates Analysis for Open Items S_ALR_87012168 5. List of Customer Open Items S_ALR_87012173 6. Customer Evaluation with Open
Item Sorted List S_ALR_87012176 7. Customer Payment History S_ALR_87012177 8. Customer Open Item Analysis
(Overdue Items Balance) S_ALR_87012178 9. List of Customer Cleared Line Items S_ALR_87012198 10.List of Down Payments open at key date S_ALR_87012199 11. Debit & Credit Notes Register – Monthly S_ALR_87012287 12. Customer wise Sales S_ALR_87012186 ACCOUNTS PAYABLE (Note : Similar Reports available for A/R
are available for A/P also) 1. Vendor Balances S_ALR_87012082 2. Vendor Debit/Credit Memo Register S_ALR_87012287Is there a Report displaying Master data, that is a list of vendors showing name, address, payment
method, etc ( everything about vendor). Is their any report like that and what's the table name to display
all vendor master data too. Go to this menu:
Financial Accounting -> Accounts Payable -> Information System -> Reports for AP accounting -> Master Data.
How to get Report of Withholding Tax along with Vendor Name. What is the T-Code or Path for this report?
You can get the withholding tax report for vendor by using these t.codes:
S_P00_07000134 - Generic Withholding Tax Reporting
S_PL0_09000447 - Withholding tax report for the vendor
Which reports we can use for the receivables to be checked on daily basis?
Go to SAP Easy Access main menu.
Go To Accounting -> FI Acc -> customer(receivables) -> information system -> reports .
Here you can get all the standard reports for receivables.
Parameters
Syntax
PARAMETERS name(length) [TYPE type or LIKE obj] DECIMALS d.
Examples
PARAMETERS: char1(20) TYPE C,
date1 LIKE SY-DATUM,
number1 TYPE P DECIMALS 2.
date1 LIKE SY-DATUM,
number1 TYPE P DECIMALS 2.
Options
- DEFAULT
Example:
PARAMETERS p1(5) TYPE C DEFAULT ’you’.
PARAMETERS p1(5) TYPE C DEFAULT ’you’.
- OBLIGATORY
Example:
PARAMETERS f1(10) TYPE C OBLIGATORY.
PARAMETERS f1(10) TYPE C OBLIGATORY.
- MEMORY ID
Example:
PARAMETERS p2(5) TYPE C MEMORY ID pid.
PARAMETERS p2(5) TYPE C MEMORY ID pid.
- LOWER CASE
Example:
PARAMETERS f1(10) LOWER CASE.
PARAMETERS f1(10) LOWER CASE.
- VISIBLE LENGTH
Example:
PARAMETERS f1(10) TYPE C VISIBLE LENGTH 4.
PARAMETERS f1(10) TYPE C VISIBLE LENGTH 4.
- MATCHCODE OBJECT
Example:
PARAMETERS p_belnr LIKE BKPF-BELNR MATCHCODE OBJECT zsh_f4_belnr.
PARAMETERS p_belnr LIKE BKPF-BELNR MATCHCODE OBJECT zsh_f4_belnr.
- VALUE CHECK
Example:
PARAMETERS p_belnr LIKE BKPF-BELNR OBLIGATORY VALUE CHECK.
PARAMETERS p_belnr LIKE BKPF-BELNR OBLIGATORY VALUE CHECK.
- AS CHECKBOX
Example:
PARAMETERS: c1 AS CHECKBOX DEFAULT ’X’.
PARAMETERS: c1 AS CHECKBOX DEFAULT ’X’.
- RADIOBUTTON GROUP
Example:
PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT ’X’,
r2 RADIOBUTTON GROUP rad1,
r3 RADIOBUTTON GROUP rad1.
PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT ’X’,
r2 RADIOBUTTON GROUP rad1,
r3 RADIOBUTTON GROUP rad1.
- NO-DISPLAY
Example:
PARAMETERS: f1(10) TYPE C NO-DISPLAY.
PARAMETERS: f1(10) TYPE C NO-DISPLAY.
- MODIF ID
Example:
PARAMETERS: f1(10) MODIF ID GR1.
PARAMETERS: f1(10) MODIF ID GR1.
Commenting
In ABAP/4, we have 2 formatting for comment:
- Line Comment: If you want to comment whole line, you can put * sign in front of the line.
Example:
* Comment Line
WRITE: This is the example for commenting.
WRITE: This is the example for commenting.
Key pad:: you can use ctrl + < to comment the whole line. And ctrl + > to withdraw the comment
- Partial Line Comment: If you want to comment partail of line, you can put " sign in front of the comment text
Example:
WRITE: This is the example for commenting. "Comment Line
ABAP/4 DATA TYPE
In ABAP/4, we can declare data by command DATA.
Type Description Initial Value C Character Space D Date ’00000000’F Floating Point 0.0I Integer 0N Numeric Text ’0’P Packed Decimal 0T Time ’000000’X Hexadecimals X00
ABAP/4 Data Type
In ABAP/4, we can declare data by command DATA.
Type Description Initial Value C Character Space D Date ’00000000’F Floating Point 0.0I Integer 0N Numeric Text ’0’P Packed Decimal 0T Time ’000000’X Hexadecimals X00
Wednesday, July 27, 2011
Hi
Any body can help to find out GL master data from SAP base line package.
mdmohiuddin2008@gmail.com
Regards
Mohiuddin
Any body can help to find out GL master data from SAP base line package.
mdmohiuddin2008@gmail.com
Regards
Mohiuddin
Tuesday, July 26, 2011
Useful SAP short cuts commands
Here’s the list of a useful SAP short cuts commands, save this as your reference.
/n Close the current session and open a new one.
/bend Cancel a batch input foreground process
/nend Close all R/3 sessions and logoff with a dialog prompt
/nxxxx Call the transaction xxxx in the same session
/o Open a new session.
/oxxxx Call the transaction xxxx in an additional session
/i Delete the current session
/h Turn the debug mode on in run time mode
/Nex Close all R/3 sessions and logoff without a dialog prompt
/bend Cancel a batch input foreground process
/nend Close all R/3 sessions and logoff with a dialog prompt
/nxxxx Call the transaction xxxx in the same session
/o Open a new session.
/oxxxx Call the transaction xxxx in an additional session
/i Delete the current session
/h Turn the debug mode on in run time mode
/Nex Close all R/3 sessions and logoff without a dialog prompt
ABAP Pop-out box for user confirmation
report ZPOPOUTBOX.
DATA: X_ANS(1) TYPE C.
call function 'POPUP_TO_CONFIRM_STEP'
exporting
* DEFAULTOPTION = 'Y'
textline1 = 'Do you want to continue'
* TEXTLINE2 = ' '
titel = 'Please Confirm'
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = X_ANS.
WRITE: / 'Thanks'.
call function 'POPUP_TO_CONFIRM_STEP'
exporting
* DEFAULTOPTION = 'Y'
textline1 = 'Do you want to continue'
* TEXTLINE2 = ' '
titel = 'Please Confirm'
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = X_ANS.
WRITE: / 'Thanks'.
Subscribe to:
Posts (Atom)