Two call transaction in Sigle Report
Hello Everybody ,
Is it possible to write BDC in baclground for two call transaction for different Tcode in a sigle ABAP Report .
Regards,
Sandeep
Hi,
Yes it is possible. Populate the values on BDCDATA table and do the call transaction. Only thing to remeber is the document flow. It should not be dependent. I.e data created by the BDC on first transaction should not be required to post second transaction. In such cases you may face difficulty for the second call transaction.
thanks,
Vivekanand
Similar Messages
-
How to resolve the error in bdc call transaction in ALV report
Dear Experts, i am executing the alv report program and in alv report program one bdc is there..
after executing output is showing in alv format but one button is there (update master)..when i am clicking update button the bdc is run but is not updated in the material master..after executing my bdc is not updated in mm02.
how to resove it?
CALL TRANSACTION 'MM02' USING BDCDATA MODE MODE
UPDATE 'S'
MESSAGES INTO MESSTAB.Hi Kaustav,
Looking at the code you attached, it appears to me that your BDC (Form USER_COMMAND) is not executed at all as you haven't passed the 'USER_COMMAND' in FM REUSE_ALV_GRID_DISPLAY for ALV display.
You must pass the importing parameter I_CALLBACK_USER_COMMAND of this FM as 'USER_COMMAND', only then this form will be executed and your BDC will run.
Thereafter, in case your BDC update fails, you can put a break-point in the form (at CALL TRANSACTION statement) and analyze the message table MESSTAB.
Hope it helps.
Regards,
Sapeksh -
Call transaction in ALV report
Dear Experts,
I want to call transaction HUMO from my ALV report on double click on Handling unit no.
I want to pass the Handling unit through my report and skip the first screen.
I try it using Call Transaction but the filed Handling unit doesn't have a parameter ID.
I also try it using Submit but the program is a function pool.
Can anyone please help me out in solving the issue.
Thanks in advance
Best regards
Ankur G.Hai,
This can be achieved by creating custom parameter id.
1.Go to the table maintenance generator of the table TPARA and go to the Maintain button through the transaction SM30.
Enter the table view name TPARA.
2.Click on the maintain button. The following information will appear. Click on the Tick button or the ENTER button to go to the next screen.
3.Enter the Set/Get parameter id as the parameter ID you want to create. Here, I will be creating the parameter Id as ZNAME_DATA1. Click on ENTER button.
4.It will ask for the text of the parameter Id. Enter the text of the parameter ID and click on the Save button.
5.Now go to the SE11 transaction for creating a data element and enter the parameter id at the Further Characteristics tab at the parameter Id section.
6.Activate the data element and use it with the program. It will act the same good as a standard one. -
CALL TRANSACTION IN INTERACVTIVE REPORT AND DIRECTLY DISPLYAING DATA
I have created a interactive report in ist list i displayed data of sales order no in the 2nd list i have to call transaction va03 and it should display the data for the sales order no which i have selected from the ist list but i am enable to write code for this can any can send the code.
Hey ravi can u be clear.I cant understand your requirement.There wont be any coding for visual composing.The coding has to be done in ABAP and the transactiond code has to be called on to the portal.
-
CALL TRANSACTION ... UPDATE 'S' and Restartable Update Request
Dear experts,
I have a program that calls a transaction by using the CALL TRANSACTION ... UPDATE 'S' statement. This transaction then performs a database update by using CALL FUNCTION ... IN UPDATE TASK statement. The database update may cause an error due to the primary key conflict.
One behavior that I notice of my program is when the database update raises an error, the corresponding update request in the update table log (SM13) will be flagged as error and non-restartable, eventhough the update module in question is restartable. Why is it like this?
To make my question clearer, I attach my transaction, program and update module below. They are very simple.
Update module:
FUNCTION z_121_15_update_module.
*"*"Update Function Module:
*"*"Local Interface:
*" IMPORTING
*" VALUE(IMP_ZSCARR_CUSTOM) TYPE ZSCARR_CUSTOM
INSERT into zscarr_custom values imp_zscarr_custom.
IF sy-subrc NE 0.
WRITE sy-subrc TO subrc.
MESSAGE subrc TYPE 'A'.
ENDIF.
ENDFUNCTION.
Subroutine in the transaction that calls the update module above:
FORM save.
zscarr_custom-carrname = sy-uzeit.
CALL FUNCTION 'Z_121_15_UPDATE_MODULE' IN UPDATE TASK
EXPORTING
imp_zscarr_custom = zscarr_custom.
COMMIT WORK.
LEAVE TO SCREEN 0.
ENDFORM.
The program that calls the transaction whose the subroutine above:
*& Report Z_121_15_COMPLEX_LUW_19
*& Program that calls a transaction.
*& Called transaction(s): Z_121_15_CLUW_20
REPORT z_121_15_complex_luw_19.
DATA:
it_bdcdata TYPE TABLE OF bdcdata,
wa_bdcdata TYPE bdcdata,
subrc TYPE char10.
wa_bdcdata-program = 'Z_121_15_COMPLEX_LUW_20'.
wa_bdcdata-dynpro = '100'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'ZSCARR_CUSTOM-CARRID'.
wa_bdcdata-fval = '01'.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'SAVE'.
APPEND wa_bdcdata TO it_bdcdata.
CALL TRANSACTION 'Z_121_15_CLUW_20' USING it_bdcdata MODE 'E' UPDATE 'A'.
*IF sy-subrc > 0.
WRITE sy-subrc TO subrc.
MESSAGE subrc TYPE 'S'.
*ENDIF.
Thanks in advance.
Regards,
HarisWhat I mean is, for example, when the called update module in the code below issues a type A message,
CALL FUNCTION 'Z_121_15_UPDATE_MODULE' IN UPDATE TASK
EXPORTING
imp_zscarr_custom = zscarr_custom.
COMMIT WORK AND WAIT.
then, in SM13, the corresponding update task will be flagged as non restart-able, eventhough the update module itself is defined as restart-able.
This also happens in the case follows: let the code below is a part of a transaction program that calls an update module
CALL FUNCTION 'Z_121_15_UPDATE_MODULE' IN UPDATE TASK
EXPORTING
imp_zscarr_custom = zscarr_custom.
COMMIT WORK.
and the transaction above is called by a program by using
CALL TRANSACTION 'THE_TRANSACTION_ABOVE' ....... UPDATE 'S'.
Am I correct? This is my conclusion so far. -
How to use call transaction stmt from webdynpro application
Hi Expers,
Can I use call transaction 'tcode' in my webdynpro application, I have tried in my application but i am getting short dump saying
Error analysis+
An exception occurred that is explained in detail below.The exception, which is assigned to class'CX_SY_SEND_DYNPRO_NO_RECEIVER', was not caught and therefore caused a runtime error. The reason for the exception is: During background processing, the system attempted to send a screen to a user. Current screen: "SAPLMGMM " 0060.
I haven't used any more statements in my application am sure from my application side everything perfect. but I have seen a screen shot
with SAP screen in webbrowser.
Please help me out if you are not clear abt my doubt please ask me for clear idea.
Thanks in advance
Phalani MHello,
Since you can't use the call transaction command in web dynpros components, I suggest you to create a report and fill a BDC table on this and use the call transaction in this report.
So, in your web dynpro component you can use a command SUBMIT to create a job in background.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
Regards. -
Posting_illegal_statement, call transaction not allowed
Hi everybody !
I'm trying to create an order and then an invoice automatically when a first invoice is saved. For that, I've got an output type in VF01 which performs special function (8). This calls my program where I used two call transactions.
I've got the error 'POSTING_ILLEGAL_STATEMENT', with the message 'call transaction not allowed'.
I saw that the same question has been asked in this forum (messageID=876563), but it is still marked as 'not answered'...
Also, someone proposed to "not use 4-immediate processing. Create an event, using tcode SM62. Raise it in your code in the special function using BP_RAISE_EVENT.
Define a job to be triggered, after the event is raised and do all that you want to do in the job."
If I don't use 4-immediate processing, which one is better to use to process VA01 immediatly after saving the billing document ?
Then, if I create a job, as it is executed in background, I don't know how to debug it and which data I can access in the program called by the job. To create the order, I need the vbeln of the billing document just created. How can I have it ? Does the table nast contain it at this moment?
Thanks in advance !
EmilieHi Nicole,
Here's the coding of the call function :
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = 'ZEVENT_FACT_TRIANG_AUTO'
* EVENTPARM = ' '
* TARGET_INSTANCE = ' '
EXCEPTIONS
bad_eventid = 1
eventid_does_not_exist = 2
eventid_missing = 3
raise_failed = 4
OTHERS = 5
Regards,
Emilie -
Dear All,
I am using call transaction 'MIGO' in report.If i click on MBLNR number of report output then it lead to MIGO transaction.
I use the following code.
SET PARAMETER ID 'MBN' FIELD I_VALUE.
CALL TRANSACTION 'MIGO' AND SKIP FIRST SCREEN.
I am passing the MBLNR values into I_VALUE variable.
It is not working fine.
If i choose A04 Display , R02 Materail document and MBLNR number in MIGO transaction and run the progarm then above piece of code is working fine.
If i choose other values instead of A04 Display , R02 Materail document in MIGO transaction and run the report above piece of code is not working.
The Above piece is not working it showing latest values selected in MIGO transaction only.
Please let me know the solution for this.
Thanks.
Regards,
Simha.check with this
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 = I_FINAL-MBLNR
I_MJAHR = I_FINAL-MJAHR
I_ZEILE = I_FINAL-ZEILE. -
Execute CALL TRANSACTION in the background....
Hi,
I want to use CALL TRANSACTION in a report program and execute this report in the background.
There is not GUI_UPLOAD / GUI_DOWNLOAD used anywhere.
Can someone suggest me what precaution I need to take in my code for CALL TRANSACTION?
Is there any additional code for background processing?
Thanks.hi,
this is the sample code:
Precations need to take :
1. see that u r transfer tha data in correct field, on correct screen, and of correct format.
2. capture the error logs in bdcmsgcoll - error logs have to be handle.
3. ensure correct recording.
in selection screen you can mention in which mode u want :
A Display all screens
E Display errors
N Background processing
P Background processing; debugging possible
This is the sample code:
& Report ZKO01_BDC &
& Object Id : &
& Object Name : ZKO01_BDC &
& Program Name : ZKO01_BDC &
& Transaction Code: ZKO01_BDC &
& Module Name : FI / CO &
& Program Type : BDC Program Create Date : 23.06.2008 &
& SAP Release : 6.0 Transport No : &
& Description : BDC to upload internal order with indernal assignment &
& Version : 1.0. &
& Changed on : &
report zko01_bdc
no standard page heading line-size 255.
types: begin of record,
auart_001(004),
ktext_002(040),
bukrs_003(004),
werks_004(004), " ADDED NEW - RAHUL SHINDE
scope_005(010),
prctr_006(004), " ADDED NEW - RAHUL SHINDE
waers_007(005),
astkz_008(001),
plint_009(001),
end of record.
types: begin of ty_stats,
mess(72) type c,
auart_001(004),
text(18) type c,
end of ty_stats.
data : it_record type table of record,
wa_record like line of it_record.
data: bdcdata type table of bdcdata,
mestab type table of bdcmsgcoll.
data : stats type table of ty_stats.
data: opt type ctu_params.
data: m(72) type c.
data : fl_name type string.
data : wa_bdcdata like line of bdcdata,
wa_mestab like line of mestab.
data : wa_stats like line of stats.
data: ctumode like ctu_params-dismode.
data: cupdate like ctu_params-updmode.
data: file type rlgrap-filename.
data: xcel type table of alsmex_tabline with header line.
data: mod1(1) type c.
initialization.
opt-dismode = 'A'.
opt-updmode = 'S'.
opt-nobinpt = 'X'. "No batch input mode
Selection Screen
selection-screen begin of block bk1 with frame.
selection-screen skip 1.
parameters p_file type localfile. " default 'D:\Common\PWC\Asset BDC\Book2.xls'.
parameters p_mode like ctu_params-dismode obligatory.
selection-screen skip 1.
selection-screen end of block bk1.
file = p_file.
mod1 = p_mode.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
static = 'X'
changing
file_name = p_file.
Selection Screen
start-of-selection.
file = p_file.
ctumode = mod1.
cupdate = 'L'.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = file
i_begin_col = '1'
i_begin_row = '1'
i_end_col = '100'
i_end_row = '5000'
tables
intern = xcel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
loop at xcel.
case xcel-col.
when '0001'.
wa_record-auart_001 = xcel-value. "ok
when '0002'.
wa_record-ktext_002 = xcel-value. "ok
when '0003'.
wa_record-bukrs_003 = xcel-value. "ok
when '0004'.
wa_record-werks_004 = xcel-value. "ok
when '0005'.
wa_record-scope_005 = xcel-value. "ok
when '0005'.
wa_record-KTEXT_005 = xcel-value. "ok
when '0006'.
wa_record-prctr_006 = xcel-value. "ok
when '0007'.
wa_record-waers_007 = xcel-value. "ok
when '0008'.
wa_record-astkz_008 = xcel-value. "ok
when '0009'.
wa_record-plint_009 = xcel-value. "ok
endcase.
at end of row.
append wa_record to it_record.
clear wa_record.
endat.
endloop.
loop at it_record into wa_record.
perform bdc_dynpro using 'SAPMKAUF' '0100'.
perform bdc_field using 'BDC_CURSOR'
'COAS-AUART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'COAS-AUART'
wa_record-auart_001.
perform bdc_dynpro using 'SAPMKAUF' '0600'.
perform bdc_field using 'BDC_OKCODE'
'=BUT2'.
perform bdc_field using 'COAS-KTEXT'
wa_record-ktext_002.
perform bdc_field using 'BDC_CURSOR'
'COAS-SCOPE'.
perform bdc_field using 'COAS-BUKRS'
wa_record-bukrs_003.
perform bdc_field using 'COAS-WERKS'
wa_record-werks_004.
perform bdc_field using 'COAS-SCOPE'
wa_record-scope_005.
perform bdc_field using 'COAS-PRCTR'
wa_record-prctr_006.
perform bdc_dynpro using 'SAPMKAUF' '0600'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
*perform bdc_field using 'COAS-KTEXT'
wa_record-KTEXT_005.
perform bdc_field using 'BDC_CURSOR'
'COAS-PLINT'.
perform bdc_field using 'COAS-WAERS'
wa_record-waers_007.
perform bdc_field using 'COAS-ASTKZ'
wa_record-astkz_008.
perform bdc_field using 'COAS-PLINT'
wa_record-plint_009.
call transaction 'KO01' using bdcdata
options from opt
messages into mestab.
*PERFORM loggs.
clear wa_record.
refresh bdcdata.
endloop.
end-of-selection.
clear : wa_stats.
if stats is initial.
write :/ text-001.
else.
loop at stats into wa_stats. "displays runtime messages
write:/ 'MESSAGE :',wa_stats-auart_001.
if wa_stats-auart_001 is not initial.
write:/ wa_stats-auart_001, wa_stats-text.
endif.
skip 1.
endloop.
endif.
*& FORMS BDC_DYNPRO
form bdc_dynpro using program dynpro.
clear wa_bdcdata.
wa_bdcdata-program = program.
wa_bdcdata-dynpro = dynpro.
wa_bdcdata-dynbegin = 'X'.
append wa_bdcdata to bdcdata..
endform.
FORM BDC_FIELD *
form bdc_field using fnam fval.
clear wa_bdcdata.
wa_bdcdata-fnam = fnam.
wa_bdcdata-fval = fval.
append wa_bdcdata to bdcdata..
endform.
*& Form loggs
text
--> p1 text
<-- p2 text
form loggs .
loop at mestab into wa_mestab.
if wa_mestab-msgtyp = 'E'.
call function 'FORMAT_MESSAGE'
exporting
id = wa_mestab-msgid
lang = 'E'
no = wa_mestab-msgnr
v1 = wa_mestab-msgv1
v2 = wa_mestab-msgv2
v3 = wa_mestab-msgv3
v4 = wa_mestab-msgv4
importing
msg = m
exceptions
not_found = 1
others = 2.
wa_stats-mess = m.
wa_stats-text = text-001. "'Not Created'.
wa_stats-auart_001 = wa_record-auart_001.
"wa_stats-sernr = wa_flat-sernr.
append wa_stats to stats.
elseif wa_mestab-msgtyp = 'S'.
call function 'FORMAT_MESSAGE'
exporting
id = wa_mestab-msgid
lang = 'E'
no = wa_mestab-msgnr
v1 = wa_mestab-msgv1
v2 = wa_mestab-msgv2
v3 = wa_mestab-msgv3
v4 = wa_mestab-msgv4
importing
msg = m
exceptions
not_found = 1
others = 2.
if wa_mestab-dyname = 'SAPMIEQ0'
and wa_mestab-dynumb = '0101'
and wa_mestab-msgspra = 'E'
and wa_mestab-msgid = 'IS'
and wa_mestab-msgnr = '144'.
loop at stats into wa_stats where auart_001 = wa_record-auart_001.
"and sernr = wa_flat-sernr.
delete stats.
endloop.
clear : wa_stats.
wa_stats-mess = m.
append wa_stats to stats.
endif.
endif.
clear : wa_stats.
endloop.
endform. " loggs
Edited by: Naseeruddin on Nov 26, 2008 8:57 AM -
Which method should use? Call Transaction or Session Method?
I need to upload 1,00,000 records then which method i need to use? Either session or call transaction?
Hi.....
A (asynchronous updating) The called transaction does not wait until the database has been
updated, it simply forward the updates to the SAP update service. This usually speeds up the CT
program. This processing mode is NOT recommended for large data sets as the called transaction
does not receive a completion message from the update module.
The calling CT program therefore cannot tell if the transaction has been successfully completed. You
should use the updating administration function (transaction SM13) to determine whether updating
was terminated early. The error analysis /correction functions for are less helpful than with
synchronous updating.
S (synchronous updating) With synchronous updating the called transaction waits until all the
updates have been completed. So processing is slower than with synchronous updating. The called
transaction can however report any updating errors to the program, which makes error
analysis/correction easier.
And
Unlike the classical batch input processing with sessions CALL TRANSACTION does not offer any
special processing procedures for transactions containing errors. There are no restart functions for
transactions that contain errors or that cause updating terminations.
Now you decide which one is best...
For large amount of data Sessions method is the better.
Thanks,
Naveen.I -
Hi all,
I have got a function module where I use two "Call Transaction" statements in a row. Seconde statement is not executed properly, but i got no message, error code etc. Even if I watch the second Call Transaction statement in visible mode the steps are executed correctly....but the maintenance plan
(IP10) is not scheduled.
When I just execute the second Call Transaction and not the first one, it works....
The code snippet is as follows:
CALL TRANSACTION 'IW32' USING it_bdcdata
MODE 'N'
UPDATE 'A'
MESSAGES INTO it_messtab.
CALL TRANSACTION 'IP10' USING it_bdcdata2
MODE 'N'
UPDATE 'A'
MESSAGES INTO it_messtab2.
Any ideas? Do I need a "commit" or sth?
thx in advance
Markushi,
Just refer the coding below for single transaction similarly you will done for two transaction.
The code is :
designed a selection screen for getting the input file name from the legacy system.Slowly review this code you will clear idea.i am updating a z field in the IT0007.:
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS : P_PATH TYPE string.
SELECTION-SCREEN END OF BLOCK B.
SELECTION-SCREEN END OF BLOCK A.
CALL FUNCTION FOR INPUT FILE NAME *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_path.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FNAME.
p_path = p_fname.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = P_PATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = INT_0007
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.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform open_group.
*Looping pernr values*
LOOP AT INT_0007 INTO WA_0007.
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*INSERTING THE PERNR VALUE*
perform bdc_field using 'RP50G-PERNR'
WA_0007-PERNR. "'00001011'.
perform bdc_field using 'RP50G-TIMR6'
'X'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-CHOIC'.
perform bdc_field using 'RP50G-CHOIC'
'0007'.
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-PERNR'.
perform bdc_field using 'BDC_OKCODE'
'=INS'.
perform bdc_field using 'RP50G-PERNR'
WA_0007-PERNR. "'1011'.
perform bdc_field using 'RP50G-TIMR6'
'X'.
perform bdc_field using 'RP50G-CHOIC'
'Planned Working Time - 0007'.
perform bdc_dynpro using 'MP000700' '2000'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_field using 'P0007-BEGDA'
'12/01/2007'.
perform bdc_field using 'P0007-ENDDA'
'12/31/9999'.
*INSERTING THE WORK SCHEDULE*
perform bdc_field using 'P0007-SCHKZ'
WA_0007-SCHKZ. "'N12'.
perform bdc_field using 'P0007-ZTERF'
WA_0007-ZTERF. "'1'.
*INSERTING THE OVERTIME CLASS*
IF WA_0007-R1 = 'X'.
perform bdc_field using 'ZHQ0007-OVT_ELGBLE'
'X'.
ELSEIF WA_0007-R2 = 'X'.
perform bdc_field using 'ZHQ0007-OVT_NOTELG'
'X'.
ELSEIF WA_0007-R3 = 'X'.
perform bdc_field using 'ZHQ0007-OVT_TMPELG'
'X'.
ENDIF.
*BDC output for transaction code*
perform f_bdc_output using 'pa30'.
PERFORM BDC_TRANSACTION USING 'PA30'.
ENDLOOP.
top-of-page.
INCLUDE ZWUHDG20 . "Global Data , Start-of-Sel. and Code
INCLUDE ZWUHDG30 . "Top-of-page and Call function
*Writing the output*
PERFORM f_write_output.
perform close_group.
*& Form f_write_output
text
--> p1 text
<-- p2 text
FORM f_write_output .
*For Successfull Records*
if int_OUT[] IS NOT INITIAL.
WRITE : /50 TEXT-004 color 4.
write : / sy-uline.
LOOP AT INT_OUT.
WRITE : /40 int_out-pernr,50 '-->',54 int_out-mesg.
ENDLOOP.
ENDIF.
write / sy-uline.
SKIP 2.
*For Error records*
if int_err[] IS NOT INITIAL.
WRITE /53 text-005 color 6.
write / sy-uline.
LOOP AT int_err.
write :/40 int_err-pernr,50 '-->',54 int_err-mesg.
ENDLOOP.
endif.
write / sy-uline.
ENDFORM. " f_write_output
*& Form f_bdc_output
text
-->P_0369 text
FORM f_bdc_output USING VALUE(P_0369).
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
REFRESH MESSTAB.
*Capturing the output message* Here You are going to * update the transaction similiar to this make another
transaction for uploading*
CALL TRANSACTION 'PA30' USING BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO MESSTAB.
L_SUBRC = SY-SUBRC.
IF SMALLLOG 'X'.
LOOP AT MESSTAB.
*Selection for capturing the text for records*
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
*Moving the text from T100 to local variable*
L_MSTRING = T100-TEXT.
IF ( MESSTAB-MSGTYP = 'W' or
MESSTAB-MSGTYP = 'S' OR
MESSTAB-MSGTYP = 'E' ).
*Moving the success records pernr and text to internal table*
IF MESSTAB-MSGTYP = 'S'.
INT_OUT-PERNR = WA_0007-PERNR.
INT_OUT-MESG = L_MSTRING.
APPEND INT_OUT.
CLEAR INT_OUT.
*Moving the success records pernr and text to internal table*
ELSEIF MESSTAB-MSGTYP = 'E'.
*For getting the error text exactly*
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
INT_ERR-PERNR = WA_0007-PERNR.
INT_ERR-MESG = L_MSTRING.
APPEND INT_ERR.
CLEAR INT_ERR.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
SKIP.
ENDIF.
*& CALL FUNCTION 'BDC_OPEN_GROUP'
IF L_SUBRC 0 AND E_GROUP SPACE.
IF E_GROUP_OPENED = ' '.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = E_GROUP
USER = E_USER
KEEP = E_KEEP
HOLDDATE = E_HDATE.
E_GROUP_OPENED = 'X'.
ENDIF.
*& CALL FUNCTION 'BDC_INSERT'
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'PA30'
TABLES
DYNPROTAB = BDCDATA.
*& CALL FUNCTION 'BDC_CLOSE_GROUP'
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 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.
ENDIF.
REFRESH BDCDATA.
ENDFORM.
plz reward if useful,
N.Rekha -
Two Questions: Link and call transaction
Hello,
Im using tableView and tableviewcontrol to display the data and corresponding columns.
How can I mark one column of table (let say VBELN) as link <a href....> so that user see there is event attached to column. Only one column should have link.
Secondly, when user click on order, I need to call VA03 and display order. When users see order and and say Back, flow come back to BSP. Will call transaction VA03 in BSP event will work and how? Currently my URL is crashing on VA03.
Im trying to do something like interactive report.
Please let me know.
AjayIt sounds like you will want to do a little research on two different topics. First for your tableView - read up on on tableView Iterators. There are weblogs and on-line help on the subject. This will allow you to easily control the rendering of individual cells of your table. You can then render an htmlb:link in the cell in question.
You can't just call VA03 from a BSP application, VA03 needs to run within the SAPGui. When I have had requirements like this, I like to use the ITS (integrated into the kernel as of Netweaver 04). The ITS has a service called webgui that will render an HTML version of any SAPGui transaction. You can pass initialization parameters to the start of the transaction (such as sales order number for the start of VA03). That way you can jump from your application right into the order you want to view. -
CALL A TRANSACTION IN SIMPLE REPORT AND RETURN BACK TO REPORT
I 'VE A REQUIREMENT IN WHICH I HAVE TO MAKE A REPORT PROGRAM. IN THIS REPORT PROGRAM I HAVE TO CALL A TRANSACTION cs11 IN BACKGROUND AND THEN PICK ITS OUTPUT VALUE (DISPLAYED IN alv GRID OF cs11) AND THEN RETURN BACK TO MAIN PROGRAM. DO SOME CALCULATION WITH THE BROUGHT DATA AND THEN DISPLAY THEM ON THE REPORT alv OUTPUT.
iS THIS POSSIBLe? IF YES? HOW.
PLEASE HELP.try creating two reports.....ztest_a and ztest_b
do your call transaction in ztest_b
in ztest_a you can write submit ztest_a and return....
see if this works...
Message was edited by:
Priyank Jain -
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. -
Drill down to all screens of XK03 in ALV report from CALL TRANSACTION
HI!
I have created a vendor master report which calls the XK03 transaction when the vendor is clicked on on the ALV output. It takes me to the XK03 address screen and when I try clicking to go to the next screen it says the last screen is reached , 'Do you wnat to cancell processing'. I want to enable the program to goto the next screens as well like the controll screen and the accounting screen ect in my drill down on call transaction.
following si my code section which does it.
CASE rs_selfield-fieldname.
WHEN 'LIFNR'.
* Set parameter ID for transaction screen field
CHECK NOT wa_vend-lifnr IS INITIAL.
SET PARAMETER ID 'LIF' FIELD wa_vend-lifnr.
SET PARAMETER ID 'BUK' FIELD wa_vend-bukrs.
SET PARAMETER ID 'EKO' FIELD wa_vend-ekorg.
SET PARAMETER ID 'KDY' FIELD kdy_val.
CALL TRANSACTION 'XK03' AND SKIP FIRST SCREEN. "EC needed
ENDCASE.
ENDCASE.
Thanks and regards,
AaravHi,
Your code seems to be right.
Try writing the code as the below format.
CASE SY-UCOMM.
* CHECK FUNCTION CODE
WHEN '&IC1'.
* CHECK FIELD CLICKED ON WITHIN ALVGRID REPORT
IF SELFIELD-FIELDNAME = 'LIFNR'.
* READ DATA TABLE, USING INDEX ROW USER CLICKED ON
READ TABLE IT_FINAL INTO WA_FINAL INDEX SELFIELD-TABINDEX.
* SET PARAMETER ID FOR TRANSACTION SCREEN FIELD
SET PARAMETER ID 'BES' FIELD WA_FINAL-LIFNR.
* EXECUTE TRANSACTION 'XK03',AND SKIP INITIAL DATA ENTRY SCREEN.
CALL TRANSACTION 'XK03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
Thanks
Arbind
Maybe you are looking for
-
DVI - Sony TV doesn't work: PAL vs. NTSC ???
I'm trying to connect my MacBook Pro via a DVI->HDMI cable to a Sony HDTV (KLV-V32A10E). The Displays Preferences detects the second display ("SONY TV"), but the TV remains blank. Interestingly enough, none of the preferred suggested resolutions (i.e
-
Error while posting data from SCM to XI
Dear Expertise, I got a requirement where I need to post data from SCM to XI server. From SCM side it is an ABAP proxy. When I tested the scenario and checked in the MONI of SCM I got an error. But SCM is correctly configured pointing to XI under Tco
-
ซื้อ line sticker ผ่านบัตร แต่ไม่ได้รับสินค้า
ฉันซื้อ ไลน์ สติกเกอร์ ทางบัตรเคดิตการ์ดของ citibank ทาง itune ได้แจ้งรายละเอียดสินค้้ามาทางเมลล์ ตามรายละเอียดด้านล่าง แต่ขณะนี้ ยังไม่ได้รับสินค้า ใน อีเมลล์ มีดังนี้ Billed To: [email protected] surirat artnarongkorn 119/16 m.4 T.bamleam A.banleam
-
Installing Adobe Acrobat XI Standard results in most of its Add-Ons being incomatible
Using Win7 64x, IE 11 I installedAcrobat XI Standard, using the "Install the most common features" option. After the install, most of the Add-Ons had a Status of Incompatible and Archittecture of 32-bit.Is there an option to install in a 64-bit achit
-
Is their a maximum database size for DB2?
Hello, we got a request from our business to install a new bw system on DB2 V8.2/V9 with an estimated end size of 100 Terabyte. I know, we have to ask our hardware partner, for sizing and this will include, partitioning,... But the first question fro