Search This Blog
Thursday, March 16, 2006
ESRDIRE - Lock Object for ABAP/4 programs
CALL FUNCTION 'ENQUEUE_ESRDIRE'
EXPORTING
name = 'PT_AR_Interface'
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e009 WITH 'Failed to lock program.'.
ENDIF.
Tuesday, December 20, 2005
ALV Refresh screen
For example:
*---------------------------------------------------------------------*
* FORM USER_COMMAND *
*---------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&DATA_SAVE'. "menubutton
PERFORM post_transactions.
r_ucomm = '&REFRESH'.
WHEN '&IC1'. "doubleclick
PERFORM handle_drilldown USING rs_selfield post_flag.
CLEAR r_ucomm.
WHEN OTHERS.
MESSAGE w061.
CLEAR r_ucomm.
ENDCASE.
ENDFORM.
Wednesday, December 07, 2005
Portugal Config Notes
IMG->
General Settings...
Enterprise Structure...
Cross-Application Components...
Financial Accounting...
*Vendor Config
IMG->
Define Vendor Account GroupsPT01 - portugalI001 - Intercompany Create number range for Account groupIX - Innnn (nnnn - company code) x-companyP1 - 10000000000 -10000099999) Portugal AssignNumber range to account group Define screen layoutTurn on international fields Created x-company vendor:I3000 and I0005
*Portugal Bank
The bank key has 8 characters (4 positions stand for the bank number + 4 positions for the branch), is numerical, and without gaps.
The bank account number has up to 11 digits, is numerical, and without gaps.
The control key has 2 digits and is numerical.
The bank key, the bank account number and the control key are checked simultaneously.
Bank account number checks in general ...
*Payment Program DME
FBZP - set up payment method and banks
FK01 - set up vendor with bank account
F110 - run payment run
FDTA - download DME/PS2 file for transmission
*Various Topics
Standardize ACH processing
Clean up payment methods for country and company (FBZP)
Payment program run design (for US and PT)
S_ALR_87012260 - BS for Portugal P&L
OBD4 - Turn on Alt. Acct No. in FS00/FSP0/etc.
IMG -> Transport Group Chart of Accounts
*COA / GLs
1) Load new COA into system (FSP0): Z_COA_LOAD (possible replace with RFBISA00)
2) Creating and changing G/L account master data (FS01...):
a. ZRFBISA00_FORMAT - Format file for RFBISA00
b. RFBISA00 - Creating and changing G/L account master data
3) Automate: OBA1 -> Exchange rate difference in open items:ZKDF_V_T030H
*Config Exchange Rate difference key (FSS0, OBA1)
IMG->
Accounts Receivable and Accounts Payable -> Prepare Automatic Posting for Foreign Currency Valuation
Consolidation -> Transport Group Chart of Accounts
General Ledger Accounting -> Delete Chart of Accounts
General Ledger Accounting -> Transport Chart of Accounts
General Ledger Accounting -> Prepare Automatic Postings for Foreign Currency Valuation
General Ledger Accounting -> Copy Chart of Accounts
*OBA1
1) Config Unrealized gain/loss for B/S accounts - Exch.rate diff. in forgn.curr.balances (KDB)
2) Config realized gain/loass for P/L accounts- Exchange rate difference in open items (KDF)
*Foreign Exchange Rate config
SPRO->
Define Additional Local Currencies
Validate/update group currency fields K* in table GLT0 using H* fields and any special purpose GL tables
*Load Exchange Rates:
RFTBFF00
Thursday, November 03, 2005
Database-Hints in Open SQL for MS SQL Server
SELECT * FROM bsas BYPASSING BUFFER
APPENDING CORRESPONDING FIELDS OF TABLE i_zkloan
WHERE aufnr = p_aufnr
%_HINTS MSSQLNT 'TABLE &TABLE& ABINDEX(ZSN), FASTFIRSTROW'.
additional information in oss notes: 133381, 129385, 159171
Problems with indexes, try the following:
Force an "update statistics" (this should happend automatically in MSSQL 7 and up).
Update Stats on one table:
USE DEV
UPDATE STATISTICS bsas
Update Stats on all tables:
USE DEV
EXEC sp_updatestats
Refreshing the statistics force the Stored Procedures to be recompiled again and the execution plans to be updated. The following command should have similar effect:
EXEC sp_recompile bsas
Monday, October 31, 2005
C call to retrieve transaction variant name at runtime
data: tcode_variant like shdfv-tcvariant,
tcode_variant_cliidep.
parameters: test.
*New field: transaction variant
call 'DY_GET_TX_VARIANT'
id 'VARIANT' field tcode_variant
id 'CLIENT_INDEPENDENT' field tcode_variant_cliidep.
write: / 'I found txn variant:', tcode_variant.
Thursday, September 15, 2005
FB1S Missing clearing information in table BSEG
1) Go to transaction OBIA and define a clearing rule.
2) Assign the field AUFNR to the clearing rule.
3) Save the definitions.
4) Go to transaction OBIB and assign the clearingrule to the concerned account type.
5) Save the changes.
Please see note 543898.
Monday, August 29, 2005
Find programs that use sapscript form
In 4.6, you can find the programs that use a layout set by going to transactoin SE71, and entering your layout set name. Go to the text elements (F9) of the main window and from there choose Insert-Symbols-Program Symbols. A list of the print programs that use the layout set will be generated.
Use one of the ABAP scan programs that SAP delivers. ie RSRSCAN
Tuesday, August 09, 2005
Select count(*) is faster then Select single
SELECT count(*) FROM bkpf WHERE bukrs = s_trans-bukrs AND
belnr = s_trans-belnr AND
gjahr = s_trans-gjahr AND
stblg = space.
vs
SELECT single * FROM bkpf WHERE bukrs = s_trans-bukrs AND
belnr = s_trans-belnr AND
gjahr = s_trans-gjahr AND
stblg = space.
Wednesday, June 08, 2005
Message type to Function Module table TBDBE
Friday, May 13, 2005
Monday, April 25, 2005
Sample Code - Control Break Processing Option
LOOP AT itab.
IF sy-tabix = 1.
MOVE-CORRESPONDING itab TO sav_itab.
ENDIF.
IF sav_itab-key <> itab-key OR
sav_itab-key2 <> itab-key2.
PERFORM append_itab USING sav_itab sum_wrbtr.
CLEAR: sav_itab, sum_wrbtr.
MOVE-CORRESPONDING itab TO sav_itab.
sum_wrbtr = sum_wrbtr + itab-wrbtr.
ELSE.
sum_wrbtr = sum_wrbtr + itab-wrbtr.
CLEAR sav_itab.
MOVE-CORRESPONDING itab TO sav_itab.
AT LAST.
PERFORM append_itab USING sav_itab sum_wrbtr.
ENDAT.
ENDIF.
ENDLOOP.
Tuesday, April 12, 2005
SGEN - SAP Load Generator
Tuesday, March 29, 2005
IDOC/ALE/XML/Change Pointers overview
Config:
•SPRO -> Search for “Change Pointer”
•Define/Assign Logical System (SALE)
•Define Port (WE21)
•Maintain Distribution Model and Distribute Views (BD64)
•Activate Change Pointers – Generally (BD61)
•Activate Change Pointers for Message Types (SPRO)
•Creating IDocs from Change Pointers ->Define Variant (BD21)
•Maintain Partner Profile Manually (WE20)
Customization:
•Additional data for message type (BD60)
Process:
•View Change Pointers (table BDCP)
•Create IDoc from Change Pointers (BD21)
•OR: Create IDoc for a range (DB14)
•View IDocs (WE05)
•Process all selected IDocs (WE14)
Other stuff:
•DTD (WE60/WE63)
•Delete Change Pointers (BD22)
•Archive IDocs (WE47, SARA)
Monday, March 28, 2005
Print Selection Parameters (RS_COVERPAGE_SELECTIONS)
z(2) TYPE c,
line LIKE raldb-infoline,
END OF it_param_values.
*Output selection Parameters
CALL FUNCTION 'RS_COVERPAGE_SELECTIONS'
EXPORTING
report = sy-cprog
variant = space
* NO_IMPORT = ' '
TABLES
infotab = it_param_values
EXCEPTIONS
error_message = 1
variant_not_found = 2
others = 3.
IF sy-subrc = 0.
LOOP AT it_param_values.
WRITE: / it_param_values-line.
TRANSFER it_param_values-line TO p_file.
ENDLOOP.
ENDIF.
Wednesday, March 23, 2005
For all entries
Wednesday, March 02, 2005
Tuesday, March 01, 2005
Transaction Variant (SHD0)
Create a transaction code with SE93 - type "transaction with variant" specify transaction and variant.
Friday, February 25, 2005
Methods Being Displayed through .Net Connector
There might be small differences in the view of BAPI explorer in SAPGUI and Visual Studio. If you need another view, you cantry to select the "Hierarchical" node and change the "X"sesin the property window before you expand the node.Which methods appear inside of a BOR class is mainly controlledif there is an implementation specified(property Abapname is not empty). If you see more methods thanyou want to have in your proxy, the easiest is either droping theBOR object and deleting the methods you don't like from the designer,or drag the methods you need individually. Note that draggingindividual method would not do some auto-customizing (e.g.use of Key-fields and so on).
Thursday, February 24, 2005
Generate Fast Entry Screen Templates
Generate Fast Entry Screen Templates
Description
In the configuration menu, a regeneration is only carried out when the variant is changed; this restriction does not apply to this program, the variants are generated without having been changed.
Friday, February 18, 2005
Sapgui sapdp00 error
The workaround is to start sapgui from command line:
Run the following command from the dos:
sapgui /H/server IP here/S/3200
Payment Methods How it works
Vendor Master (VM)
+PM in the VM - are the allowable PMs if the invoice PM is left blank.
+PM in the Invoice - overrides what is in the VM.
+PM in the payment program(F110) looks for invoices with a matching PM.
For example:
Vendor 1 PM = C
Invoice a PM = blank
Invoice b PM = M
Invoice c PM = C
Invoice d PM = D
F110 PM = CM will create a payment for:
Invoice a PM => C (PM came from the VM, if the VM PM was blank, this invoice would not have been created)
Invoice b PM => M (invoice overrode VM PM)
Invoice c PM => C (invoice overrode VM PM)
Invoice d PM => not selected by F110
Saturday, February 12, 2005
Monday, January 31, 2005
Download to excel file with multiple worksheets/tabs
Link to SAP Help
Thursday, January 27, 2005
Tuesday, January 25, 2005
Tuesday, January 18, 2005
trigger an event from an external program
Create the event in SM62 (i.e. DTEST_EVENT)
Create a job to run after event SM36(i.e. DTEST_JOB)
Create a program on SAP server (i.e. d:\Raise_DTEST.cmd)
Run the program.
The magic command in the program is:
sapevt
(i.e. sapevt DTEST_EVENT -t name=DEV nr=00 )
EVENTID is the name of the SAP defined event to raise
-t will create a trace file
the program must have access to \\
Monday, January 17, 2005
Friday, January 14, 2005
Field Validation config for Tranid
1) Assign validation to company code
2) create validation (i.e. dat_chk)
3) create step, check, message
(GCX2) Maintain Client-Dependent User Exits activity in the Implementation Guide (IMG) for Special Purpose Ledger
1) enter the appropriate user exit program
2) maintain user exit program (ZGGBS000 and ZGGBR000 -- copied from -- RGGBS000 and RGGBR000)
Additional:
IMG -> search for Validation (OB28 for accounting docs)
IMG -> search for Substitution (OBBH for accounting docs)
Wednesday, January 05, 2005
Check Processing
F-58 - Payment w/ print
FBZ5 - Print
FCH4 - Renumber
FCH7 - Reprint
FCH8 - Cancel
FCH9 - Void
FCHT - Change Assignments
Tuesday, January 04, 2005
Configure FB10 - Invoice Fast Entry
A: Which screen are you referring to? Please confirm is it for programSAPMF05A and screen 127. These details you can get it from menu patchSystem --> Status. You can enable or disable list of possible fieldsif they are available in the corresponding screen layout editor viaSE51. I checked in our test system for tcode FB10 and noticed that inthe screen 127 there is no possibility of having 'House Bank' fieldsince the availability of field on this screen doesn't exist. Hope thisinformation clarifies your query. Should the problem is resolved pleaseclose the message. Please do not hesitate to revert me in case you haveany queries with necessary info like, program name and screen number tocheck the possibility of having 'House Bank' field.
R: I was able to active house bank for transaction FB10, however, it was not on the initial screen and was difficult to get to. Based on this and SAP's response, I've decided to modify SAPMF05A screen 8001 (FB10, entry template Z003) to include house bank. A modified version of this screen is already in production and it has a repair open in DEV that I'll have to clean up and/or close as not to migrate it to PRD. Otherwise, this looks like it will be a good solution for the users to choose/override the bank determination logic.
Friday, December 17, 2004
Wednesday, December 15, 2004
OK_CODE to '=/BDA' when you want to give a user control at a specific screen during a call transaction
Set OK_CODE to '=/BDA' when you want to give a user control at a specific screen during a call transaction.
So instead of run mode A where you see all the screens or run mode E where you only see the errors, you can use run mode N and then stop the program on a specific screen and give the control to the user. When the user finishes the transaction the control goes back to the program, I think.