Chaining two transactions
Hi All,
I have two transactions. I need to execute one after the other. But the first one dont through any export parameter and once the first transaction executed automatically the second transaction has to be run. I sit possible to run like this with out having any export parameters from the first transaction?
I have created two separate scripts for running two transactions and for chaining them i hav e created third script but how can i get them executed one after the other?
Thank you in advance
Regards
G.s.naidu
>
G.S. NAIDU wrote:
> Hi All,
>
> I have two transactions. I need to execute one after the other. But the first one dont through any export parameter and once the first transaction executed automatically the second transaction has to be run. I sit possible to run like this with out having any export parameters from the first transaction?
>
> I have created two separate scripts for running two transactions and for chaining them i hav e created third script but how can i get them executed one after the other?
>
> Thank you in advance
>
> Regards
> G.s.naidu
Hi,
In the third script,you have to do the following.
Once you are in the command editor,you have to use the command REF from the pattern.
We have to use this command to call the test scripts as follows/in the order in which you want to execute.
REF(SCRIPT A,SCRIPT A_1).
REF(SCRIPT B,SCRIPT B_1).
The next step is to parameterize the required fields in the third script(Parent script).
When you execute the main script,it will execute in the pattern you want.
hope this info help.
Regards,
SSN.
Similar Messages
-
Chaining two transactions in eCATT
Hi All,
I have two transactions. I need to execute one after the other. But the first one dont through any export parameter and once the first transaction executed automatically the second transaction has to be run. I sit possible to run like this with out having any export parameters from the first transaction?
I have created two separate scripts for running two transactions and for chaining them i hav e created third script but how can i get them executed one after the other?
Thank you in advance
Regards
G.s.naiduHi,
take all the fields to internal table and then use like this.
Loop at it_table to wa_table.
*************for first Transaction
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=INS'.
perform bdc_transaction using 'TCODE'." first t code
*****************for second transactions
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=INS'.
perform bdc_transaction using 'TCODE'." this t code is second one
endloop.
try this, i hope you can succeed.
Regards,
Arjun.
Edited by: mallikarjuna goud on Dec 17, 2008 10:35 AM -
Chain two standar transactions
Hi Guys i need to chain two standar transactions F-48 with FBZ5, but not using Z programming. The problem is when in f-48 the user SAVE the document y need to call FBZ5 for print a check. In F-48 i was search for user exits and i obtain this:
F050S001,F050S002,F050S003,F050S004,
F050S005,F050S006,F050S007,F180A001,
FARC0002,RFAVIS01,RFEPOS00,RFKORIEX,SAPLF051
But when i search CALL CUSTOMER on SAPMF05A program, i not found nothing.
Please any tip for solve this problem
Thanks in andvancehi
What ever u r telling is correct. But if it very urgent, u can try like this. You found some user exits right? So go to SMOD and give that exit name below select component radio button and press display button. You will get function module exits. If you have access, then go and give some small logic (any thing like c = a + b) inside the function module and put break point. Do for all exits like that and come back.
Once you completed above process in all exits then go to f-48 transaction give some inputs and press SAVE button. Check any function module where you wrote that small logic is triggering. If you find then you can use that function module for you purpose as i hope.
Reward if it dose.
Thanks
Siva Kumar -
There are two transactions ZJPVCS303 and ZJPVCS303_US for one single Report
When run as a batch program, (currently this is the case), or withT-Code ZJPVCS303 the selection screen is unchanged (except for additional sales area above)
- When run as T-Code ZJPVCS303_UL (UL stands for Upload) the selection screen is changed. The unix file option is no longer available, and the user is able to upload a local file (in the same format as the current unix file, but tab delimited) to the program for processing.
Requirements:
There are two transactions ZJPVCS303 and ZJPVCS303_US for one single Report.
->When ZJPVCS303 Transaction is executed, the file is uploaded from the Application
server to SAP R/3. The selection screen parameters would be:
Logical Filename:
Sales Organization:
Distribution Channel:
Division:
->When ZJPVCS303_US Transaction is executed, the file is uploaded from the Presentation Server
to SAP R/3. When this transaction is executed, it should not have the 'Logical
Filename' parameter anymore on the selection-screen. Instead it should only have
Local File name on the presentation server:
Sales Organization:
Distribution Channel:
Division:
The same thing is applicable for the other transaction ZJPVCS303. When transaction ZJPVCS303
is executed, it should not have the 'Local Filename' parameter anymore on the selection-screen. Instead it should only have
Logical Filename:
Sales Organization:
Distribution Channel:
Division:
So how should I make these parameters invisible depending on the transaction codes execution.
I have an idea of using MODIF ID, LOOPING AT SCREEN...MODIFY SCREEN.
I have an idea of using SY-TCODE.
EX:
AT SELECTION-SCREEN OUTPUT.
IF SY-TCODE = 'ZJPVCS303'.
LOOP AT SCREEN.
IF SCREEN-GROUPID = 'GRP'.
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF SY-TCODE = 'ZJPVCS303_US'.
LOOP AT SCREEN.
IF .....
ENDLOOP.
ENDIF.
ENDIF.
But I am not able to get the output which I require. Please help me out.Hello Rani
Basically the transaction determines whether upload starts from application server (AS) or presentation server (PC). Thus, you will have the following parameter:
PARAMETERS:
p_as_fil TYPE filename MODIF ID unx, " e.g. Unix server
p_pc_fil TYPE filename MODIF ID wnd. " e.g. Windows PC
AT SELECTION-SCREEN OUTPUT.
CASE syst-tcode.
* transaction(s) for upload from server (AS)
WHEN 'ZJPVCS303.
LOOP AT screen.
IF ( screen-group1 = 'UNX' ).
screen-input = 0.
screen-invisible = 1.
MODIFY screen.
ENDIF.
ENDLOOP.
* transaction(s) for upload from local PC (PC)
WHEN 'ZJPVCS303_US.
LOOP AT screen.
IF ( screen-group1 = 'WND' ).
screen-input = 0.
screen-invisible = 1.
MODIFY screen.
ENDIF.
ENDLOOP.
WHEN others.
ENDCASE.
Regards
Uwe -
Error in DAC ETL Full Load (Supply Chain Inventory Transactions)
Hi Gurus,
My Environment is like this,
Syatems: windows 2003 server 32 bit
DAC: 10.1.3.4.1 with Patch 10052370
Informatica : Power Center 8.6.1 Hot Fix 11
OBIA: 7.9.6.2
OBIEE: 10.1.3.4.1
I Created a plan with one Subject area Supply Chain Inventory Transactions. while running i am getting an error (out of 241 tasks 22 got failed). Nothing got Failed in Informatica. TASK_Group_Load_PositionHierarchy got failed. when i go through the log the error is like this.
Error:
Values :
Null Map
MESSAGE:::ORA-00604: error occurred at recursive SQL level 1
ORA-01654: unable to extend index SYS.I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST by 128 in tablespace SYSAUX
ORA-06512: at "SYS.DBMS_STATS", line 18408
ORA-06512: at "SYS.DBMS_STATS", line 18429
ORA-06512: at line 1
EXCEPTION CLASS::: java.sql.SQLException
Error:
MESSAGE:::DataWarehouse:DBMS_STATS.GATHER_TABLE_STATS(ownname => 'DWH_REP', tabname => 'W_POSITION_DH', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO',cascade => false, degree => DBMS_STATS.DEFAULT_DEGREE)
ORA-00604: error occurred at recursive SQL level 1
ORA-01654: unable to extend index SYS.I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST by 128 in tablespace SYSAUX
ORA-06512: at "SYS.DBMS_STATS", line 18408
ORA-06512: at "SYS.DBMS_STATS", line 18429
ORA-06512: at line 1
Values :
Null Map
Please Help me to Solve this.
Edited by: 846311 on Apr 11, 2011 10:52 PMHi Naveen,
Thanks for your reply,
I added one more temp tablespace like temp3, it resolves my problem, i am getting sucesses now. temp tablespace is using while exicuting large queries like aggrications.
Thanks,
Rajesh Thumuluri -
Restrict to use of two transaction concurrently in ABAP program
Hi,
We have requirement to restrict a user could not using two transaction
at the same time. how could i achieve this. Please throw some light on this.Hi
--> create a lock object from SE11
Ex : lock object name is EZLOCK
-->Click on Create
-->Give the table name
--> Lock mode (Write, read, Exclusive not cumulative)
--> Give the Lock parameters
-->save --> activate --> Then system will generate to function module
1. ENQUEUE_EZLOCK (for locking)
2. DEQUEUE_EZLOCK (For Unlocking)
--> you need to call these function module in respective areas
ex: In PAI of the screen call ENQUEUE F.M and in
the exit perfroms use DEQUEUE F.M
Ex code to use the f.m's
*To avoid acces of multiple users at a time
CALL FUNCTION 'ENQUEUE_EZCONIC'
EXPORTING
mode_zpicci = 'E'
zpicnum = g_fffc
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
LEAVE TO SCREEN 1000.
ENDIF.
*To unlock the trascation
CALL FUNCTION 'DEQUEUE_EZCONIC'.
Thanks & Regards
Mallikharjuna Reddy -
Can I daisy chain two Thunderbolt displays to the new MacBook Airs (July 2011)?
I have last year's MacBook Air -- probably the best Mac I've ever had and I've had a few. I looked at using multiple displays last year, but the reviews for the major 3rd-party solutions really demonstrate how little is possible.
I see Apple says you can double up on displays for the MacBook Pro (I have a pre-Thunderbolt one unfortunately), what about the new (July 2011) MacBook Airs?
Anyone tried? Anyone know?
(I have a 30" Dell display, but it is, and always has been, very flakey when it comes to connecting to a Mac laptop).You can thank Intel for that.
The sandy bridge chips all have integrated graphics, and before they were released -- they took nvidia to court claiming they didn't have a "license" to make GPU chipsets for the sandy bridge line. Intel won, and consumers lost.
The solution most manufacturers are using for notebooks is graphics switching (nvidia optimus like technology) -- which basically uses a discreet GPU along side the intel integrated GPU, and switches between the two instantaenously based on the workload and \ or battery life -- this is how the macbook pro's with the ATI gpus work.
Since there isn't enough space physically inside a macbook air for a discreet GPU, and since no company in the world is allowed to make a shared GPU for intel's sandy bridge chipsets -- the only solution is to use the integrated graphics that is in the processors -- Intel HD 3000. Intel basically has the monopoly here...there is no legal solution in the world another company can provide thanks to our wonderful court system
Wanna know the really sad part about the Intel HD 3000 GPU? The Nvidia 320M (the GPU used in the previous model 2010 macbook air -- chip was released to the market in April of last year) actually out performs it in some benchmarks -- that's right, a 1+ year old shared gpu from nvidia outperforms Intel's 2011 integrated graphics.
Intel ***** at graphics, period.
The only other solution I can think of is for you to get the "Echo Express" product from Sonnet:
http://www.sonnettech.com/product/thunderbolt/index.html
It's basically an external bay that will allow you to put a PCIe GPU inside it, and it would then connect via thunderbolt to the macbook air.
You would then use the minidisplayport connectors on the PCIe GPU to connect to the apple displays -- I believe any modern ATI or Nvidia GPU can support up to 3 or 4 external displays.
Unfortunately, sonnet's bay is not released yet, and you'd also have to make sure the PCIe GPU you get supports both thunderbolt AND os x....so yeah, kind of slim pickens right now
EDIT:
So apparently the macbook pros can daisy chain two thunderbolt displays -- Apple has a picture of it on their site:
http://storeimages.apple.com/1867/as-images.apple.com/is/image/AppleInc/MC914_AV 7?wid=1200&hei=1200&fmt=jpeg&qlt=95&op_sharpen=0&resMode=bicub&op_usm=0.5,0.5,0, 0&iccEmbed=0&layer=comp
I just bought a new mac air too...I was gonna get a mbpro but they are just too expensive -- the one I configured was at around 3000$
Wanna know what's lame about using the thunderbolt display with the mac air? So the new mac air has the magsafe connector on one side and the thunderbolt connector on the other -- they're not on the same side like the macbook pro is (see picture) -- so basically the cable is going to have to slack around the back of the macbook air -- who designed that? Must have been smoking some good meth ;p
Message was edited by: NiqueXyZ -
Two transaction variant do not working for a user
Hi Gurus
I have created two Z t code and made transaction variant through T Code SHD0 and assigned these two ZTcode to a user. now when a user is running the Ztcode screen variant is active on only one. when i assign second one to the user again than screen variant of first ZT code do not work.
can any one tell me why system is doing so.
Regards
ShivHi, I have the same situation. Can you please help how your case got solved ?
Basically I have created two transaction variants- one for XD02, the other for XD03. When I am trying to assign a user to both these transaction variants ( using SET PROPOSAL), only one is getting assigned, other is getting deactivated. Please help. -
Chaining two Extremes--which order? (part 2)
Just reconfigured my home network after buying Cisco RVS4000 router and adding a second simultaneous dual-band AEBS. I followed Tesserax's advice in the previous thread (Chaining two Extremes--which order?) recently.
The two db extremes are bridged and both use the same network name, passwords, and security levels.
One odd behavior I can't figure out:
When I eliminated the non-simultaneous db extreme from the chain and was resetting the existing sDB, it took on the profile of the extreme I eliminated from the chain. I have hard reset it several times, both manually and through the airport utility interface. Even though it says it resets, in the summary tab, it continues to indicate it is a (fast ethernet) model and not the (simultaneous dual-band) model. And the radio settings seem to mirror those of the older model.
So, to summarize, hardware wise, I have two new simultaneous dual band extremes but airport utility indicates I only have one. The network appears to be working fine, but I'm wondering whether I'm getting the full functionality of the hardware.
I don't know how to fix this.Couple of additional questions. Under your suggestion, what should the settings be under "wireless mode?" Assuming it would be:
802.11n (non-dual)= "create a wireless network"
802.11n (dual)= "extend a wireless network"
Actually, you will want the following settings:
o 802.11n (non-dual) = Create a wireless network
o 802.11n (dual) = Create a wireless network
The only reason to choose "Extend a wireless network" would be if the two routers were NOT connected by wire.
Also, what about the checkboxes asking "Allow this network to be extended?" for each base station. Should they be checked or unchecked?
You will want both "unchecked." Again, this would be because the routers are connected by Ethernet and this option is the "other half" of the "Allow this network to be extended"/"Extend a wireless network" pair to define a dynamic WDS. Neither are required (or desired) when the routers are connected by wire.
The reason I was using WDS even though it was against my instinct is this paragraph from "Take Control" book by Glenn Fleishman ...
Glenn provides an excellent reference in the Take Control series. I believe what Glenn is referring to here is in a situation where you had two AirPort connected by wire (like you do) and want to extend the wireless range even further. Using his instruction for your case would be if you wanted to add a third AirPort ... say an AirPort Express. You could then configure the 802.11n (dual) and Express into a dynamic WDS.
Actually, in this case, it would be advantageous to switch the Extremes so that the dual would be connected to the modem and the WDS would be configured between the non-dual and Express. -
Assign GL account in two transaction keys
Hi! In OBYC, is it possible for us to assign the GL account twice? We would like to use a specific GL account in two Transaction Keys.. Is that possible?
Thanks so much!
Regards,
PaulaHi,
BSX- Account is Balanc sheet account.
PRD is P& L Account-- the same varient G/; account only can assign to twice.
Check in FS00. the G|L account account group.
SAM -
Calling two transaction in one Zprogram
How to call two transaction (MIGO and MIRO)with each transaction should display two different window simultaneously from one Zprogram..
Pls let me know ...Hello Arun
If you like to use an ABAP-OO version here is my approach:
*& Report ZUS_SDN_CALL_TRANSACTION
REPORT zus_sdn_call_transaction.
TYPE-POOLS: abap.
PARAMETERS:
p_tcode TYPE tcode.
START-OF-SELECTION.
CALL FUNCTION 'AUTH_CHECK_TCODE'
EXPORTING
tcode = p_tcode
EXCEPTIONS
parameter_error = 1
transaction_not_found = 2
transaction_locked = 3
transaction_is_menu = 4
menu_via_parameter_transaction = 5
not_authorized = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL METHOD cl_reca_gui_services=>call_transaction
EXPORTING
id_tcode = p_tcode
* IF_LEAVE_CURRENT = ABAP_FALSE
* IF_SKIP_FIRST_SCREEN = ABAP_FALSE
if_new_external_mode = abap_true " new mode
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END-OF-SELECTION.
Regards
Uwe -
How to stop the activity clipboard linkage between two transactions?
Hi Experts,
We are using CRM 2007. In CRM, since there is no check that the agent needs to work on transactions related to once customer at a time, our agents are able to work on different different transactions belonging to different customers one after another.
As a result, transactions belonging to two different customers are getting linked in the Activity Clipboard of interaction Record as well as Service Order transactions.
We need to place a check so that before the link is created, we can compare the customers of the two transactions and if they differ, we should not create the link. Can you please guide me where is the best place to put such a check?
As per my analysis, we need to stop the doc flow being created if the transactions have different sold to/customer.
Any pointers/suggestions?
Thanks
RohitHi Rohit
Did you manage to get any solution to this?
if you have, would appreciate if you could share the solution.
Rgds
Rusyinni -
Can we record two transactions and use for a Call-transaction BDC?
can we record two transactions and upload data using Call-transaction method in BDC ?IF not why?
Hi Prakash,
Here i used two transactions.
REPORT zra_gl_cr NO STANDARD PAGE HEADING LINE-SIZE 255.
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
DATA:messtab1 LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
DATA:messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF i_mess OCCURS 0,
l_mstring(480),
msgnr(5),
msgv1(15),
END OF i_mess.
DATA:i_mess1 LIKE i_mess OCCURS 0 WITH HEADER LINE.
DATA: l_mstring(480),l_mstring1(480).
DATA: BEGIN OF it_itab OCCURS 0,
saknr(10), "G/L a/c number.
bukrs(4), "Company Code.
ktoks(4), "G/L a/c group.
xplacct(1), "P&L statement account.
xbilk(1), "Balance sheet account.
txt20_ml(20), "G/L a/c short text.
txt50_ml(50), "G/L a/c long text.
waers(5), "Account currency.
MWSKZ(2),
mitkz(1), "Reconciliation a/c for a/c type.
xopvw(1), "Open item management
xkres(1), "Line item display.
zuawa(3), "Sort Key.
fstag(4), "Field status group.
xintb(1), "Post automatically only.
hbkid(5), "House bank.
hktid(5), "Account id.
vzskz(2), "Interest indicator
END OF it_itab.
DATA: hdate LIKE sy-datum.
Selection Screen *****
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(15) text-103. " FOR FIELD P_FILE1.
SELECTION-SCREEN POSITION 25.
PARAMETERS : p_file1 LIKE rlgrap-filename.
SELECTION-SCREEN END OF LINE.
Initialization *****
INITIALIZATION.
At Selection Screen *****
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
Perform file_selection will help to select the location of the file
PERFORM file_selection.
Start-Of-Selection *****
START-OF-SELECTION.
Perform data_upload will help to upload the data from the flat file
to the internal table.
PERFORM data_upload.
PERFORM open_group.
Peform bdc_upload will help to upload the data from the internal
table into its respective fields.
PERFORM bdc_fspo.
PERFORM bdc_upload.
PERFORM exp_log.
PERFORM close_group.
Perform display_log will prepare a log for the data that has been
uploaded
PERFORM display_log.
End-Of-Selection ****
END-OF-SELECTION.
*& Form file_selection
To select the location of the file
FORM file_selection .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ' '
def_path = 'C:\'
mask = ',.txt,.xls.'
mode = 'O'
title = 'Open a excel file'
IMPORTING
filename = p_file1
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
ENDFORM. " file_selection
*& Form data_upload
To upload the data from the file location to the internal table.
FORM data_upload .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file1
TABLES
i_tab_converted_data = it_itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " data_upload
*& Form bdc_upload
To upload the data from the internal table into its respective fields.
FORM bdc_upload .
LOOP AT it_itab.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ACC_CRE'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-SAKNR'.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'
it_itab-SAKNR.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'
it_itab-BUKRS.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=2102_GROUP'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'
it_itab-XPLACCT.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=2102_BS_PL'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-XBILK'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'
it_itab-XPLACCT.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
it_itab-XBILK.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ENTER'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
it_itab-XBILK.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
it_itab-TXT20_ML.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
it_itab-TXT50_ML.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-BILKT'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-BILKT'
it_itab-saknr.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TAB02'.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-ktoks.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
it_itab-txt20_ml.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
it_itab-txt50_ml.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-BILKT'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-BILKT'
it_itab-saknr.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB02'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-KTOKS.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-KTOKS.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
it_itab-XBILK.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
it_itab-TXT20_ML.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
it_itab-TXT50_ML.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-BILKT'
it_itab-saknr.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ENTER'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-WAERS'
it_itab-waers.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
it_itab-MWSKZ.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
it_itab-mitkz.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-XOPVW'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XOPVW'
it_itab-XOPVW.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XKRES'
it_itab-XKRES.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
it_itab-ZUAWA.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
it_itab-xplacct.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XBILK'
it_itab-xbilk.
IF it_itab-xbilk = 'X'.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TAB03'.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-WAERS'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
it_itab-waers.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
it_itab-xopvw.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
it_itab-mitkz.
ENDIF.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
it_itab-xkres.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
it_itab-zuawa.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-FSTAG'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
it_itab-fstag.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
it_itab-xintb.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-HBKID'
it_itab-hbkid.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-HKTID'
it_itab-hktid.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_CCODE-VZSKZ'
it_itab-vzskz.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB03'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-WAERS'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-WAERS'
it_itab-WAERS.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
it_itab-MWSKZ.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
it_itab-MITKZ.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
it_itab-ZUAWA.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ENTER'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-FSTAG'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
it_itab-FSTAG.
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-FSTAG'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
it_itab-FSTAG.
PERFORM bdc_transaction USING 'FS00'.
CALL TRANSACTION 'FS00' USING bdcdata MODE 'A'
UPDATE 'S'
MESSAGES INTO messtab1.
PERFORM mess1.
REFRESH bdcdata[].
ENDLOOP.
ENDFORM. " bdc_upload
*& Form bdc_fspo
text
FORM bdc_fspo .
LOOP AT it_itab.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ACC_CRE'.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-SAKNR'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
it_itab-saknr.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_KEY-KTOPL'
'1000'.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=2102_GROUP'.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-ktoks.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
it_itab-xplacct.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XBILK'
it_itab-xbilk.
PERFORM bdc_dynpro USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-KTOKS'
it_itab-ktoks.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
it_itab-xplacct.
PERFORM bdc_field USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-TXT50_ML'.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
it_itab-txt20_ml.
PERFORM bdc_field USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
it_itab-txt50_ml.
*perform bdc_transaction using 'FSP0'.
CALL TRANSACTION 'FSP0' USING bdcdata MODE 'A'
UPDATE 'S'
MESSAGES INTO messtab.
PERFORM mess.
REFRESH bdcdata[].
ENDLOOP.
ENDFORM. " bdc_fspo
*& Form mess
text
--> p1 text
<-- p2 text
FORM mess . "fsp0
LOOP AT messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab-msgid
lang = messtab-msgspra
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
IMPORTING
msg = l_mstring
EXCEPTIONS
not_found = 1
OTHERS = 2.
CONDENSE l_mstring.
i_mess1-l_mstring = l_mstring(250).
i_mess1-msgnr = messtab1-msgnr.
i_mess1-msgv1 = messtab1-msgv1.
APPEND i_mess1.
ENDLOOP.
ENDFORM. " mess
*& Form mess1
text
--> p1 text
<-- p2 text
FORM mess1 . "fs00
LOOP AT messtab1.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab1-msgid
lang = messtab1-msgspra
no = messtab1-msgnr
v1 = messtab1-msgv1
v2 = messtab1-msgv2
v3 = messtab1-msgv3
v4 = messtab1-msgv4
IMPORTING
msg = l_mstring1
EXCEPTIONS
not_found = 1
OTHERS = 2.
CONDENSE l_mstring1.
i_mess-l_mstring = l_mstring1(250).
i_mess-msgnr = messtab1-msgnr.
i_mess-msgv1 = messtab1-msgv1.
APPEND i_mess.
ENDLOOP.
ENDFORM. " mess1
*& Form exp_log
text
--> p1 text
<-- p2 text
FORM exp_log .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\temp\error_fsp0.txt'
filetype = 'DAT'
TABLES
data_tab = i_mess1.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\temp\error_fs00.txt'
filetype = 'DAT'
TABLES
data_tab = i_mess.
ENDFORM. " exp_log
*& Form bdc_dynpro
text
-->PROGRAM text
-->DYNPRO text
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_Field
********Rewards some points. -
Bdc two transactions at a time
Hello frendz,
How do i call two transactions in bdc simultaneously in one bdc program.
Can anyone send me steps or document for the same(to do above process for pb10, pb30, 9005 and 9007).
Pls help me its urgent.
Regards,
AmeetHi ameet,
U can call two Transaction in BDC program by using Call transaction Method But one by one it ll process
like :
1. Fisrt upload ur source file it may be Excel Sheet or Text to ur program (it_data internal table)
2. u r having recorded code (it should be seperate for each transaction)
2. what are all the data required for First transaction u can pass and finish
3. what are all the data required for Second transaction u can pass and finish..thats all
Refer the following code:
here called
1. perform bdc_transaction using 'F-58'
2.perform bdc_transaction using 'FBZ5'.
*& Report ZPAYMENT2 For Payment with printout Data
upload Using BDC.
*& Payment with printout Data upload Using BDC.
*& TCODE: F-58.
*& METHOD: CALL TRANSACTION.
REPORT ZPAYMENT2 no standard page heading line-size 255.
Table Bkpf for Accounting Document Header
Table Bsak for Clear item
Table Bsik for open item
Tables:Bkpf,Bsak,Bsik,t001.
logic for posted
1. User can give either reference no or Acct doc no. REference Doc
takes preceedance
2. If REference no is gvien
* 2.1 Fetch all the records from bkpf table with field
* 'BUKRS' = comp code
* 'XBLNR' = refernce doc no
* 'BLART' = 'RE'(hardcode)
* 2.2 Search for that accounting document(BELNR and GJAHR) for that
Vendor in BSAK (cleared item ) and BSIK (open item)
* 2.2.1 if the document is not there in both tables
* Show error as 'the document doesnt exists'
* 2.2.2 if the document is there in BSAK (cleard item)
* Show error as ' There is no open items for the doc'
* 2.2.3 if ther documet is there in bsik (open item)
* Assign the acct doc no to that record and *process it.
* Note : No Document will not be there in both tables.
3. If Account doc is given
* 3.1 if the document is not there in both tables
* Show error as 'the document doesnt exists'
* 3.2 if the document is there in BSAK (cleard item)
* Show error as ' There is no open items for the doc'
* 3.2 if ther documet is there in bsik (open item)
* Assign the acct doc no to that record and process it.
Note : Document should be posted only when all the line
items are valid
If there is any items with error then the document should not be
posted.
INCLUDE BDC*******************************
include zbdcinclude.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
Generated data section with specific formatting - DO NOT CHANGE ***
TYPES: BEGIN OF file_format,
New_doc(2), "1.New document
Comp_code(4), "2.Cmpany code
Pay_method(1), "3.Payment method
Hous_bank(5), "4.Housing bank
Check_lot(4), "5.Check lot
Post_date(10), "6.Posting date
Doc_date(10), "7.Document date
ref_text(15), " Reference Text
doc_htext(25), "8.Document header text
Branch(4), "9.Business area (bank)
Amount1(16), "10.Amount in document currency
Bank_AccTxt(50), "11.Bank account text
Vendor_no(10), "12.Vendor number
Ref_doc(16), "13.Reference document number
Acc_docu(10), "14.Account document number
Partial(2), "15.Partial payment indicator
Pay_Amount(15), "16.Payment amount
Item_text(50), "17.Item text
Bank_no(4), "18.Bank number
End of file_format.
"File format for select the account document number
TYPES: Begin of file_format1,
acc_doc(10), "1.Account document number
fiscal_lay(4), "2.Fiscal layer
cmp_code(4), "3.Company code
Ref_dno(16), "4.Reference document number
doc_type(2), "5.Document type
End of file_format1.
TYPES: Begin of file_format2,
acc_dno(10), "1.Account document number
fiscal_lay(4), "2.Fiscal layer
End of file_format2.
"Work area
TYPES: Begin of file_format3.
include type file_format.
include type file_format2.
TYPES: End of file_format3.
TYPES: Begin of l_opayf1.
include type opayf.
TYPES: End of l_opayf1.
data:l_opayf type l_opayf1.
Constants:
comp_code(4) type c value '5000'.
DATA: IT_Ndoc TYPE STANDARD TABLE OF file_format3,
WA_DATATAB4 TYPE file_format3,
print_opt type OPAYF.
"Work area
DATA: WA_DATATAB1 TYPE file_format1,
WA_DATATAB2 TYPE file_format2,
WA_DATATAB3 TYPE file_format2.
******Internal table generated *****************
DATA: IT_DATA TYPE STANDARD TABLE OF file_format,
WA_DATATAB TYPE file_format,
WA_DATATABH TYPE file_format.
DATA: IT_RAW TYPE TRUXS_T_TEXT_DATA,
NO_OF_LINES TYPE F,
xbelnr type bkpf-belnr.
data:cnt type i value 1,
status(02),
status1(02).
End generated data section ***
START OF SELECTION ************
START-OF-SELECTION.
PERFORM LOAD_FILE_DATA.
PERFORM REPORT_HEADER.
PERFORM PROCESS_DATA.
DESCRIBE TABLE IT_DATA LINES NO_OF_LINES.
READ THE INTERNAL TABLE *
.PERFORM THE BDC.......
*FORM PROCESS_DATA.
LOOP AT it_data into wa_datatab.
LINE_NO = sy-tabix.
add 1 to line_no . "Because header is deleted from excel
IF Wa_datatab-New_doc = 'X'.
IF wa_datatab-New_doc = 'X' and status <> 'X' and
status1 = 'S' and sy-tabix <> 1.
PERFORM PROCESS_BDC.
Status = ''.
Status1 = ''.
Clear it_ndoc.
Refresh it_ndoc.
Clear Wa_datatabH.
Endif.
"Check initial screen entry and some fiels
IF wa_datatab-vendor_no is initial or
wa_datatab-comp_code is initial or
wa_datatab-Pay_method is initial or
wa_datatab-Hous_bank is initial or
wa_datatab-Check_lot is initial or
wa_datatab-Amount1 is initial .
write:/2 line_no,20 'E',25 'Enter initial screen entry first'.
Status = 'X'.
Else.
"Read the header data store in work area
READ TABLE IT_DATA INDEX CNT INTO Wa_datatabH.
perform validate_data1.
ENDIF.
ELSE.
perform validate_data2.
"Allow onely partial partial payment
IF wa_datatab-Partial = 'X' or wa_datatab-Partial = 'x'.
IF Wa_datatab-ref_doc is initial and
wa_datatab-acc_docu is initial.
write:/2 line_no,20 'E',25 'Enter ref_no or acc_no'.
Status = 'X'.
ELSE.
"Select the document number from account heaser table(bkpf)
IF not wa_datatab-ref_doc is initial.
select single belnr gjahr bukrs xblnr blart from bkpf into wa_datatab1
where ( blart = 'RE' or blart = 'KR' )
and
bukrs = comp_code and
xblnr = wa_datatab-ref_doc.
Else.
IF not wa_datatab-acc_docu is initial.
select single belnr gjahr bukrs xblnr blart from bkpf into wa_datatab1
where ( blart = 'RE' or blart = 'KR' )
and
bukrs = comp_code and
belnr = wa_datatab-acc_docu.
ENDIF.
ENDIF.
"Check the document number is exist or not in acc header(bkpf)
IF wa_datatab1-acc_doc is initial.
write:/2 line_no,20 'E',25 'The document doesnot exit',
wa_datatab1-acc_doc.
status = 'X'.
Else.
"Select the document number from clear item table(bsak)
select single belnr gjahr from bsak into wa_datatab2
where lifnr = wa_datatabH-vendor_no and
gjahr = wa_datatab1-fiscal_lay and
belnr = wa_datatab1-acc_doc and
bukrs = comp_code.
"Select the document number from open item table(bsik)
select single belnr gjahr from bsik into wa_datatab3
where lifnr = wa_datatabH-vendor_no and
gjahr = wa_datatab1-fiscal_lay and
belnr = wa_datatab1-acc_doc and
bukrs = comp_code.
"Check the document number is exist or not in both table
IF ( wa_datatab2-acc_dno is initial OR
wa_datatab2-fiscal_lay is initial ) and
( wa_datatab3-fiscal_lay is initial OR
wa_datatab3-acc_dno is initial ).
write:/2 line_no,20 'E',25 'The document doesnot exit',
wa_datatab1-acc_doc.
status = 'X'.
Else.
"Check the document number is exist or not in clear item table(bsak)
IF not wa_datatab2-acc_dno is initial and
not wa_datatab2-fiscal_lay is initial.
write:/2 line_no, 'E',25 'There is no open items for the document',
wa_datatab1-acc_doc.
status = 'X'.
Else.
"Check the document number is exist or not in open item table(bsik)
IF not wa_datatab3-acc_dno is initial and
not wa_datatab3-fiscal_lay is initial.
Status1 = 'S'.
move-corresponding wa_datatab to wa_datatab4.
move-corresponding wa_datatab3 to wa_datatab4.
APPEND wa_datatab4 to IT_NDOC.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
CLEAR wa_datatab.
CLEAR wa_datatab1.
CLEAR wa_datatab2.
CLEAR wa_datatab3.
CLEAR wa_datatab4.
add 1 to cnt.
ENDLOOP.
*ENDFORM.
IF status <> 'X' and status1 = 'S'.
PERFORM PROCESS_BDC.
Endif.
PERFORM WRITE_ERR_FILE.
FORM PROCESS_BDC.
FORM PROCESS_BDC.
DATA:
search_line(2) type n,
search_line1(2) type n,
FIELD_NAME(20) TYPE C,
line_indx(3) type n.
add 1 to line_indx.
perform bdc_dynpro using 'SAPMF05A' '0129'.
perform bdc_field using 'BDC_OKCODE'
'/ENV'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-WRBTR'.
perform bdc_dynpro using 'SAPMF05A' '0130'.
perform bdc_field using 'BDC_CURSOR'
'OPAYF-PSTAP'.
perform bdc_field using 'BDC_OKCODE'
'=MW'.
perform bdc_field using 'OPAYF-BUKRS'
comp_code.
perform bdc_field using 'OPAYF-RZAWE'
wa_datatabH-Pay_method.
perform bdc_field using 'OPAYF-HBKID'
wa_datatabH-Hous_bank.
perform bdc_field using 'OPAYF-PSTAP'
wa_datatabH-Check_lot.
perform bdc_dynpro using 'SAPMF05A' '0129'.
perform bdc_field using 'BDC_CURSOR'
'BKPF-XBLNR'.
perform bdc_field using 'BDC_OKCODE'
'=PA'.
perform bdc_field using 'BKPF-BLDAT'
wa_datatabH-Doc_date.
perform bdc_field using 'BKPF-BUDAT'
wa_datatabH-Post_date.
perform bdc_field using 'BKPF-XBLNR'
wa_datatabH-ref_text.
perform bdc_field using 'BKPF-BKTXT'
wa_datatabH-doc_htext.
perform bdc_field using 'BSEG-WRBTR'
wa_datatabH-Amount1.
perform bdc_field using 'BSEG-GSBER'
Wa_datatabH-Branch.
perform bdc_field using 'BSEG-SGTXT'
wa_datatabH-Bank_AccTxt.
perform bdc_field using 'OPAYF-LIFNR'
wa_datatabH-vendor_no.
perform bdc_field using 'RF05A-XPOS1(01)'
record-XPOS1_01_012.
perform bdc_field using 'RF05A-XPOS1(03)'
'X'.
perform bdc_dynpro using 'SAPMF05A' '0730'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-VONWT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=SL2'.
perform bdc_dynpro using 'SAPMF05A' '0608'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-XPOS1(04)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RF05A-XPOS1(01)'
record-XPOS1_01_010.
perform bdc_field using 'RF05A-XPOS1(04)'
'X'.
Enter item document number in search screen
perform bdc_dynpro using 'SAPMF05A' '0731'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-SEL01(01)'.
Loop at IT_NDOC into wa_datatab4.
add 1 to search_line.
CONCATENATE 'RF05A-SEL01(' search_line ')' INTO FIELD_NAME.
perform bdc_field using FIELD_NAME
wa_datatab4-acc_dno.
if search_line = 10. "if items are more than 10
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF05A' '0731'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-SEL01(01)'.
search_line = 0.
endif.
Endloop.
perform bdc_field using 'BDC_OKCODE'
'=PA'.
Enter the amount of partial payments
perform bdc_dynpro using 'SAPDF05X' '3100'.
perform bdc_field using 'BDC_OKCODE'
'=PART'.
search_line = 1.
Loop at IT_NDOC into wa_datatab4
where Partial = 'X' or Partial = 'x'.
search_line = sy-tabix.
"select the item as first item
perform bdc_dynpro using 'SAPDF05X' '3100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF05A-ABPOS'
search_line.
perform bdc_dynpro using 'SAPDF05X' '3100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'DF05B-PSZAH(01)'
wa_datatab4-Pay_Amount.
Endloop.
Simulate the all
perform bdc_dynpro using 'SAPDF05X' '3100'.
perform bdc_field using 'BDC_OKCODE'
'=BS'.
perform bdc_field using 'BDC_CURSOR'
'DF05B-PSZAH(01)'.
Give the line number and Item text
Loop at IT_NDOC into wa_datatab4.
add 1 to line_indx.
Click the detial icon
perform bdc_dynpro using 'SAPMF05A' '0700'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWBS'.
perform bdc_field using 'BDC_OKCODE'
'=PI'.
Chose the line item
perform bdc_dynpro using 'SAPMF05A' '0610'.
perform bdc_field using 'BDC_CURSOR'
'*BSEG-BUZEI'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using '*BSEG-BUZEI'
line_indx.
Enter the text and click document over view (AB)
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-SGTXT'.
perform bdc_field using 'BDC_OKCODE'
'=AB'.
perform bdc_field using 'BSEG-SGTXT'
wa_datatab4-Item_text.
Endloop.
*Save or post
perform bdc_dynpro using 'SAPMF05A' '0700'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWBS'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BDC_OKCODE'
'=D'.
perform bdc_transaction using 'F-58'.
get parameter id 'BLN' field xbelnr.
inserted by ganesh*******************
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_CURSOR'
'OPAYF-PSTAP'.
perform bdc_field using 'BDC_OKCODE'
'=DRUK'.
perform bdc_field using 'BKPF-BELNR'
xbelnr.
perform bdc_field using 'OPAYF-BUKRS'
'5000'.
perform bdc_field using 'BKPF-GJAHR'
wa_datatab4-fiscal_lay.
perform bdc_field using 'OPAYF-RZAWE'
wa_datatabH-Pay_method.
perform bdc_field using 'OPAYF-PSTAP'
wa_datatabH-Check_lot.
l_opayf-bukrs = '5000'.
l_opayf-PPRIZ = 'DEFA'.
l_opayf-PPRIA = 'DEFA'.
l_opayf-PSTAP = wa_datatabH-Check_lot.
l_opayf-PSOFO = 'X'.
l_opayf-RZAWE = wa_datatabH-Pay_method.
*CALL FUNCTION 'FORM_PRINT_AFTER_POSTING'
EXPORTING
i_belnr = xbelnr
i_gjahr = wa_datatab4-fiscal_lay
i_opayf = L_OPAYF
I_REPRI =
EXCEPTIONS
ADDR_MISSING = 1
CANCEL = 2
OTHERS = 3
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
loop at YT042I.
endloop.
*CLEAR L_OPAYF.
perform bdc_dynpro using 'SAPLF028' '0101'.
perform bdc_field using 'OPAYF-ABPOS'
wa_datatabH-Bank_no.
perform bdc_field using 'BDC_OKCODE'
'=PI'.
perform bdc_dynpro using 'SAPLF028' '0101'.
perform bdc_field using 'BDC_CURSOR'
'T042I-HBKID(01)'.
perform bdc_field using 'BDC_OKCODE'
'=PI'.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_OKCODE'
'/n'.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_OKCODE'
'/n'.
perform bdc_transaction using 'FBZ5'.
if not xbelnr is initial.
clear allmessages.
allmessages-line_no = line_no.
allmessages-msg_type = 'S'.
concatenate
'Document '
xbelnr
' created successfully.'
into
allmessages-msg_desc.
append allmessages.
perform write_to_screen.
perform print_cheque.
endif.
clear xbelnr.
set parameter id 'BLN' field xbelnr.
ENDFORM.
FORM HEADER_DETAILS *
FORM REPORT_HEADER.
new-line.
uline.
WRITE : AT 10 ' BDC to upload Custemer master data Extending',
70 'Date : ',
80 SY-DATUM.
NEW-LINE.
WRITE : AT 70 'Time : ',
80 SY-UZEIT.
uline.
WRITE : AT 2 ' LINE NO ',
15 'MSG TYPE ',
25 ' DESCRIPTION'.
ULINE.
ENDFORM.
FORM LOAD FILE DATA
FORM LOAD_FILE_DATA.
refresh: IT_DATA,
ALLMESSAGES.
clear: IT_DATA,
ALLMESSAGES.
data: IT_RAW TYPE TRUXS_T_TEXT_DATA.
Load the GL Master File to the Internal table
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = IT_DATA[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
STOP.
ENDIF.
ENDFORM.
FORM convert into internal format (unpack)
form convert_internal changing field.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = field
IMPORTING
OUTPUT = field.
endform.
FORM validate data
form validate_data1.
perform convert_internal changing wa_datatabh-vendor_no.
perform convert_internal changing wa_datatabh-COMP_CODE.
endform.
form validate_data2.
perform convert_internal changing wa_datatab-ref_doc.
perform convert_internal changing wa_datatab-Acc_docu.
endform.
FORM WRITE ERROR MESSAGE TO SCREEN
FORM WRITE_TO_SCREEN.
NEW-LINE.
write : AT 2 line_no ,
AT 25 ALLMESSAGES-MSG_DESC.
IF ALLMESSAGES-MSG_TYPE = 'E'.
WRITE: AT 17 ALLMESSAGES-MSG_TYPE COLOR COL_NEGATIVE.
ELSE.
WRITE: AT 17 ALLMESSAGES-MSG_TYPE.
ENDIF.
ENDFORM.
FORM WRITE ERROR MESSAGE TO SCREEN
form print_cheque.
clear print_opt.
print_opt-BUKRS = comp_code.
print_opt-RZAWE = wa_datatabH-Pay_method.
print_opt-HBKID = wa_datatabH-Hous_bank.
print_opt-PSTAP = wa_datatabH-Check_lot.
print_opt-PPRIZ = 'DEFA'. "default printer
print_opt-PPRIA = 'DEFA'. "default printer
print_opt-PSOFO = 'X'. "print imm
print_opt-PESPR = 'X'. "Text in receipient lang
print_opt-LIFNR = wa_datatabH-vendor_no.
select single * from t001 where bukrs = comp_code.
CALL FUNCTION 'GL_ACCOUNT_FOR_PAYMENT'
EXPORTING
I_BUKRS = comp_code
I_HBKID = wa_datatabH-Hous_bank
I_LAND1 = t001-land1
I_WAERS = 'INR'
I_ZLSCH = wa_datatabH-pay_method.
IMPORTING
E_HKONT =
E_HKTID =
CALL FUNCTION 'PAYMENT_FORM_PRINT'
EXPORTING
I_OPAYF = print_opt
I_VBLNR = xbelnr
endform.
Regards,
ganesh -
Handling two transactions in session method at a time
Hi frnds
now im facing problem in handling two transactions in session method fs00,fspo
at a time.
i want some info.on how to handle two transactions at a time
thanxUse the function module in the following sequence.
BDC_OPEN_GROUP.
BDC_INSERT. " for the first TCODE
BDC_INSERT. " for the second TCODE
BDC_CLOSE_GROUP.
This will solve your problem.
Reward if helpfull.
Thanks and regards,
Veerendranath Maddula.
Maybe you are looking for
-
Blu-ray DVD no longer recognized by HP MediaSmart or Windows Media Player
I have the HP Pavilion Elite HPE 250-f desktop computer. This computer includes a CD/DVD/Blu-ray drive. I bought this computer in 2010, and all these years I have successfully played CDs and DVDs on the computer. Until now, I have not attempted to pl
-
Consumption failure in SAP for PO.
Want to know the root cause of consumption failure in SAP for PO.Once GR was processed successfully, materials will be back flushed automatically in SAP. According to our findings, we found error message "insufficient materials at vendor to complete
-
Automatic creation of KM folder structure from xml pattern
Hi all, is it possible to create a KM folder structure automaticly, following the tree structure of an xml document? For example: an xml-document with following content: <item id=1 level=0>abc</item> <item id=2 level=1>aaa</item> <item id=3 level=1>b
-
Lose broadband connection after waking from sleep
I use Power Mac G5 OSX10.3.9 to connect to the internet, via Sky Broadband (in the UK) and Netgear DG834GT modem with ethernet cable (not wireless). I can connect with no problem and everything is fine, as long as I keep my G5 on or shut it down comp
-
Adobe Flash Pro Volume License Install
I have use various methods of including the volume license in the install of Adobe Flash Professional and none of these methods actually prevent the Validation screen from appearing on the first load of Adobe Flash Professional version 8. I have use