Call Transaction 'MIGO'
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.
Similar Messages
-
Call Transaction "MIGO" in display mode only
Hi friends,
I have changed the standard the SAP standard program MB51 to a Customer Program 'ZMB51' based upon the user requirement.Iam able to get all the values (output)
Now my requirement is .... iam trying to call transaction "MIGO" when the user clicks on the Material Document Number (MBLNR) (as how in Standard program)
I ve used "ALV_GRID..." display. and given a callback_user_command also .... iam able to call the trasaction ...... but it is editable and not in the display mode ..........
Here my code :
FORM SY_UCOMM_FOR_MBLNR USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE
SLIS_SELFIELD.
IF RS_SELFIELD-FIELDNAME EQ 'MBLNR'.
IF NOT RS_SELFIELD-VALUE IS INITIAL AND
RS_SELFIELD-VALUE NE SY-ULINE.
CALL TRANSACTION 'MIGO'.
ENDIF.
IF R_UCOMM EQ SPACE.
ENDIF.
ENDIF.
ENDFORM. " SY_UCOMM_FOR_MBLNR
So ??????????????????
What is the remedy ????
Expecting ur answers....
Thanks in Advance
Cheers,
R.Kripa.Hi ... it is solved ...
I ve changed the code as how it was in MB51 report.
Here is my code
FORM SY_UCOMM_FOR_MBLNR USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE
SLIS_SELFIELD.
CASE RS_SELFIELD-TABNAME.
WHEN 'I_FINAL'.
READ TABLE I_FINAL INDEX RS_SELFIELD-TABINDEX.
ENDCASE.
CHECK SY-SUBRC = 0 .
IF R_UCOMM = '&IC1'.
CHECK RS_SELFIELD-TABNAME = 'I_FINAL'.
CASE RS_SELFIELD-FIELDNAME.
WHEN 'MBLNR'.
SET PARAMETER ID 'MBN' FIELD I_FINAL-MBLNR.
SET PARAMETER ID 'POS' FIELD I_FINAL-ZEILE.
SET PARAMETER ID 'MJA' FIELD I_FINAL-MJAHR.
ENDCASE.
IF SY-SUBRC = 0.
SELECT SINGLE * FROM MKPF
WHERE MBLNR = I_FINAL-MBLNR
AND MJAHR = I_FINAL-MJAHR.
IF SY-SUBRC = 0.
MIGO_DIALOG is a funcion module to set the MIGO transaction
in Display mode.
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.
ENDIF.
ENDIF.
ENDIF.
But still if anyone knows how to call MIGo transaction i Display mode using 'CALL TRANSACTION 'MIGO''.
Thanks friends,
Cheers
R.Krpia. -
How to pass the value to the screen through call transaction
hi
i have got an requirement for which i have to call MIGO tcode through call transaction command. But here one list box GODYNPRO-ACTION (screen field) contains list of values . my requirement is when i will call the tcode MIGO it should take defaultly DISPLAY option from list of values. I have searched for parameter id but i cannot get for that list box. please help me to solve this issue.
points will be surely assigned to helpful answers.
regards
shiba duttajust try this its working...
tables: godynpro.
GODYNPRO-ACTION = 'Display'.
call transaction 'MIGO'.
Message was edited by:
Chandrasekhar Jagarlamudi -
Hi,
I want to call transaction MIGO twice in a report using batch input:
once with Goods Receipt acition(A01) AND
once with Goods issue action(A07).
My problem is that MIGO remebers the last MIGO transaction and does not accept new batch input fields for antother action.
Does anyone know how to refresh the MIGO memory or something?
Best Regards
Anne M JohannessenTry with the code b4 batch input is called.
Delete from Esdus where uname = sy-uname.
This will delete the user settings for that user.
Tharani -
MIGO-Error when MIGO is execute by call transaction on background
When we execute MIGO_TR or MIGO_GI in call transaction, this error is showed.
"RAISE_EXCEPTION" " "
"CL_GUI_CUSTOM_CONTAINER=======CP" or "CL_GUI_CUSTOM_CONTAINER=======CM001"
"CONSTRUCTOR"
Is there any alternate function available for the MIGO and avoiding the same error.
Thanks in advance.
WalterHi Walter,
MIGO is a SAP Enjoy transaction so BDC is not supported on the same.
Regards,
Atish -
BAPI for Reversal of Goods Receipt Purchase Order(Transaction : MIGO)
Hi all,
Is there any BAPI for the Reversal of posting the documents Goods receipt Purchase order
(Transaction: MIGO).
Any inputs on this..is highly appreciable...
thanks in advance...
regards..
prathima.Hi,
Try this passing material doc and year.
* Cancel the goods movement (creates a reversal document)
CALL FUNCTION 'BAPI_GOODSMVT_CANCEL'
EXPORTING
materialdocument = g_material_doc
matdocumentyear = g_matdoc_year
TABLES
return = i_return.
Edited by: Raj on May 14, 2008 7:46 PM -
BAPI needed for Goods Receipt Purchase Order(Transaction : MIGO)
Hi all,
We have a requirement where in we need to post the documents throuh BAPI for Goods receipt Purchase order(Transaction: MIGO).
Any inputs on this..is highly appreciable...
thanks in advance...
regards..
prathima.Hi,
use 'BAPI_GOODSMVT_CREATE'
Check this sample.
code
REPORT ZRICH_0001 .
Structures for BAPI
DATA: GM_HEADER TYPE BAPI2017_GM_HEAD_01.
DATA: GM_CODE TYPE BAPI2017_GM_CODE.
DATA: GM_HEADRET TYPE BAPI2017_GM_HEAD_RET.
DATA: GM_ITEM TYPE TABLE OF
BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.
DATA: GM_RETURN TYPE BAPIRET2 OCCURS 0 WITH HEADER LINE.
DATA: GM_RETMTD TYPE BAPI2017_GM_HEAD_RET-MAT_DOC.
CLEAR: GM_RETURN, GM_RETMTD. REFRESH GM_RETURN.
Setup BAPI header data.
GM_HEADER-PSTNG_DATE = SY-DATUM.
GM_HEADER-DOC_DATE = SY-DATUM.
GM_CODE-GM_CODE = '04'. " MB1A
Write 971 movement to table
CLEAR GM_ITEM.
MOVE '412' TO GM_ITEM-MOVE_TYPE .
MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
MOVE '3800533484' TO GM_ITEM-MATERIAL.
MOVE '1' TO GM_ITEM-ENTRY_QNT.
*MOVE 'PC' TO GM_ITEM-ENTRY_UOM.
MOVE '1060' TO GM_ITEM-PLANT.
MOVE '0007' TO GM_ITEM-STGE_LOC.
*MOVE '0901' TO GM_ITEM-MOVE_REAS.
MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
APPEND GM_ITEM.
Call goods movement BAPI
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GM_HEADER
GOODSMVT_CODE = GM_CODE
IMPORTING
GOODSMVT_HEADRET = GM_HEADRET
MATERIALDOCUMENT = GM_RETMTD
TABLES
GOODSMVT_ITEM = GM_ITEM
RETURN = GM_RETURN.
IF NOT GM_RETMTD IS INITIAL.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ELSE.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ENDIF.
WRITE:/ GM_RETMTD.
LOOP AT GM_RETURN.
WRITE:/ GM_RETURN.
ENDLOOP.
[/code]
Also check the Bapis
BAPI_PO_CREATE --> To create Purchase Order
BAPI_PO_CHANGE --> To change Purchase Order
BAPI_PO_GETDETAIL --> Todisplay Purchase Order
Regards,
Raj. -
Call transaction method in back ground Processing?
HI Friends,
I am working on interface program to post documents of 309 movement type into MIGO transaction .
my program is executing succesfully when i am processing in fore ground.
but when i am processing in background it is giving error .
can any help in this requirement?
*Solution rewarded*My Program will do transfer Posting from material to material.
when i am executing the program in back ground mode The Program statement call transaction fails with the following error
CALL_TRANSACTION MIGO_TR Return code = 1,001 RECORD: 0
S
Field GODYNPRO-ACTION . is not an input field
S
Field GODYNPRO-REFDOC . is not an input field
S
Field GOITEM-UMMAKTX . is not an input field
S
similar statement when executing in foreground it is posting document succesfully.
kindly revert back for any other information. -
Any pointers to a badi for transaction MIGO and MB1a
Hi all,
Can anyone tell if there is any badi which can give us all the values entered by the user in transaction MIGO and MB1a.Hi Anu,
whenever you need a BADI...
Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
1) Goto se24 (Display class cl_exithandler)
2) Double click on the method GET_INSTANCE.
3) Put a break point at Line no.25 (CASE sy-subrc).
Now
4) Execute SAP standard transaction
5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find all the BADIs called on click of any button in any transaction.
[found on SDN a year ago, don't remember the contributor]
Regards,
Clemens -
User Exit to Populate Data in Uploading Point Field of Transaction MIGO
Hello.
I'm looking for a User Exit or any better way if possible, to populate data in Uploading Point at Transaction MIGO.
Basically my client do not want to enter directly information in this field, in order to avoid data entry errors.
That's why I'm looking for the user exit, to populate the information and my client selected from there.
I appreciate your help.
HectorHi
You can use the enhancement MB_CF001 includes a function module that is called up
immediately before the COMMIT WORK when a goods movement is posted.
All the material document data is passed on to this function module from
the following tables:
o MKPF (Material document header)
o MSEG (Material document items)
o VM07M (Update data)
This data can be passed on to other programs.
Regards
Antony -
Unable to Capture ALV output in an Internal Table, after CALL TRANSACTION
Dear all,
My requirement is to run multiple materials in T-code CK86_99 but as we know CK86_99 is only adequate to one material at a time.
So, I want to capture the Output of the T-code in my Internal table with respect to all the Material Numbers I use in the Select-Options of my Z Program.
Below is the Code I developed so far, but the Class
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lf_ref ).
is not capturing the Ouput...
Please have a look and enlighten me how it could be solved.
TABLES : mara.
DATA : BEGIN OF wa_mara,
matnr TYPE mara-matnr,
END OF wa_mara.
DATA: it_bdcdata TYPE TABLE OF bdcdata,
wa_it_bdcdata LIKE LINE OF it_bdcdata,
it_mara LIKE TABLE OF wa_mara.
* BELNR(10).
FIELD-SYMBOLS:<fs_tab> TYPE ANY TABLE,
<fs_line> TYPE any.
DATA:lf_ref TYPE REF TO data,
lf_ref1 TYPE REF TO data.
SELECT-OPTIONS so_matnr FOR mara-matnr.
PARAMETERS p_werks LIKE t001w-werks.
*BELNR = 'Z92'. " Give Document Number here
SELECT matnr FROM mara INTO TABLE it_mara WHERE matnr IN so_matnr.
DATA opt TYPE ctu_params.
LOOP AT it_mara INTO wa_mara.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-program = 'SAPMKKB0'.
wa_it_bdcdata-dynpro = '0300'.
wa_it_bdcdata-dynbegin = 'X'.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'KKB0-MATNR'.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'KKB0-MATNR'.
wa_it_bdcdata-fval = wa_mara-matnr.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'KKB0-WERKS'.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'KKB0-WERKS'.
wa_it_bdcdata-fval = p_werks.
APPEND wa_it_bdcdata TO it_bdcdata.
CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_OKCODE'.
wa_it_bdcdata-fval = 'OSNY'."'ONLI'."=CRET'.
APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-program = 'SAPLKKRSOO'.
* wa_it_bdcdata-dynpro = '0100'.
* wa_it_bdcdata-dynbegin = 'X'.
* APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-fnam = 'BDC_OKCODE'.
* wa_it_bdcdata-fval = 'BACK'."=CRET'.
* APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-program = 'SAPMKKB0'.
* wa_it_bdcdata-dynpro = '0300'.
* wa_it_bdcdata-dynbegin = 'X'.
* APPEND wa_it_bdcdata TO it_bdcdata.
* CLEAR wa_it_bdcdata.
* wa_it_bdcdata-fnam = 'BDC_OKCODE'.
* wa_it_bdcdata-fval = 'EXIT'."=CRET'.
* APPEND wa_it_bdcdata TO it_bdcdata.
opt-dismode = 'N'.
cl_salv_bs_runtime_info=>set(
EXPORTING display = abap_false
metadata = abap_true
data = abap_true ).
CALL TRANSACTION 'CK86_99' USING it_bdcdata OPTIONS FROM opt.
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lf_ref ).
ASSIGN lf_ref->* TO <fs_tab>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'Unable to retrieve ALV data' TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
IF <fs_tab> IS ASSIGNED.
CREATE DATA lf_ref1 LIKE LINE OF <fs_tab>.
ASSIGN lf_ref1->* TO <fs_line>.
ENDIF.
*LOOP AT <FS_TAB> ASSIGNING <FS_LINE>.
*ENDLOOP.Hi Abhay,
If you go to Transaction code SE93, enter the tcode "CK86_99" and click display, you may see the default value for transaction is "KKBB" and the screen field for P_SCREEN = 0300, P_TCODE = ck86_99.
You may need to copy the transaction code "KKBB" and go to SE93 again, enter the tcode for "KKBB" then click display, now you may see the program name is "RKKB1000".
Hope this answer your question.
Thanks
Hock Lin -
Call transaction error handling
how to maintain the log i.e sucess/failures like below.
Line No. Success/ Failure Document No Error Details
1 S Doc 740000001
2 S Doc 740000002
3 F Co- code does not exist
4 F GL Account does not exist
I'm getting only one last document no: but i need all the documents to be displayed i.e either success/failures.
below is my code.
TYPES: BEGIN OF ty_filedata,
bukrs TYPE bukrs, "Company code
blart TYPE blart, "Document type
bldat TYPE char10, "Document Date
budat TYPE char10, "Posting date
xblnr TYPE xblnr, "Reference
bktxt TYPE bktxt, "Document Header text
waers TYPE waers, "Currency
newbs TYPE bschl, "Posting Key for the next line item
wrbtr TYPE char10, "Amount
zuonr LIKE bsik-zuonr, "Assignment
sgtxt TYPE sgtxt, "Text
newko TYPE hkont, "Account for the next line item
END OF ty_filedata.
TYPES: BEGIN OF ty_detail_log,
item_no TYPE i, " Item line no.
status(1) TYPE c, " Status - success/failure
doc_no TYPE bkpf-belnr," Document No.
message TYPE string, " Message
END OF ty_detail_log.
*& DATA declaration of internal tables
Internal Table declaration for excel data
DATA: it_itab TYPE STANDARD TABLE OF alsmex_tabline INITIAL SIZE 0,
Internal Table declaration for upload data
it_upload TYPE STANDARD TABLE OF ty_filedata INITIAL SIZE 0,
Internal Table Declaration for BDCDATA
it_bdcdata TYPE STANDARD TABLE OF bdcdata,
Internal Table Declaration for BDCMSGCOLL
it_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll,
Internal Table Declaration for FILENMAE
lf_fname TYPE rlgrap-filename.
t_err_log TYPE STANDARD TABLE OF ty_err
INITIAL SIZE 0, " table for validation error log
t_DETAIL_LOG TYPE STANDARD TABLE OF TY_DETAIL_LOG.
C_MSGNO TYPE BDC_MNR VALUE '312',
*& DATA declaration of work area
Work Area declaration for Excel Data
DATA: w_itab TYPE alsmex_tabline,
Work Area declaration for upload data
w_upload TYPE ty_filedata,
Work Area declaration for upload data
w_upload_n TYPE ty_filedata,
Work Area declaration for upload data
w_bdcdata TYPE bdcdata,
Work Area declaration for upload data
w_bdcmsgcoll TYPE bdcmsgcoll,
w_detail_log TYPE ty_detail_log.
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
PARAMETERS:p_file TYPE rlgrap-filename. " MODIF ID G1.
SELECTION-SCREEN: END OF BLOCK bk1.
*& AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
dynpro_number = syst-dynnr
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 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.
*& START-OF-SELECTION
START-OF-SELECTION.
DATA: lw_itab TYPE alsmex_tabline.
lf_fname = p_file.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lf_fname
i_begin_col = '1'
i_begin_row = '6'
i_end_col = '12'
i_end_row = '999'
TABLES
intern = it_itab[]
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
*MESSAGE S205(ZF_COMMON_MSGS_FIN1) DISPLAY LIKE C_E.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
IF it_itab IS NOT INITIAL.
SORT it_itab BY row col.
DELETE it_itab WHERE row LT 6.
LOOP AT it_itab INTO lw_itab.
w_itab = lw_itab.
AT NEW row.
CLEAR: w_upload.
ENDAT.
CASE w_itab-col.
WHEN '0001'.
w_upload-bukrs = w_itab-value.
WHEN '0002'.
w_upload-blart = w_itab-value.
WHEN '0003'.
w_upload-bldat = w_itab-value.
WHEN '0004'.
w_upload-budat = w_itab-value.
WHEN '0005'.
w_upload-xblnr = w_itab-value.
WHEN '0006'.
w_upload-bktxt = w_itab-value.
WHEN '0007'.
w_upload-waers = w_itab-value.
WHEN '0008'.
w_upload-newbs = w_itab-value.
WHEN '0009'.
w_upload-wrbtr = w_itab-value.
WHEN '0010'..
w_upload-zuonr = w_itab-value.
WHEN '0011'.
w_upload-sgtxt = w_itab-value.
WHEN '0012'.
w_upload-newko = w_itab-value.
ENDCASE.
AT END OF row.
APPEND w_upload TO it_upload.
CLEAR: w_upload.
ENDAT.
ENDLOOP.
*endif.
ENDIF.
DATA: lw_upload TYPE ty_filedata,
lv_lines TYPE sy-tabix,
lv_index TYPE sy-tabix.
DESCRIBE TABLE it_upload LINES lv_lines.
LOOP AT it_upload INTO lw_upload.
lv_index = sy-tabix.
w_upload = lw_upload.
IF NOT w_upload-bukrs IS INITIAL.
IF lv_index GT 1.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text.
REFRESH: it_bdcdata.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMF05A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BKPF-XBLNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BKPF-BLDAT'
w_upload-bldat.
PERFORM bdc_field USING 'BKPF-BLART'
w_upload-blart.
PERFORM bdc_field USING 'BKPF-BUKRS'
w_upload-bukrs.
PERFORM bdc_field USING 'BKPF-BUDAT'
w_upload-budat.
PERFORM bdc_field USING 'BKPF-WAERS'
w_upload-waers.
PERFORM bdc_field USING 'BKPF-XBLNR'
w_upload-xblnr.
*perform bdc_field using 'FS006-DOCID'
PERFORM bdc_field USING 'RF05A-NEWBS'
w_upload-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO'
w_upload-newko.
ENDIF.
IF lv_index NE lv_lines.
lv_index = lv_index + 1.
READ TABLE it_upload INTO w_upload_n INDEX lv_index.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-WRBTR'
w_upload-wrbtr.
PERFORM bdc_field USING 'RF05A-NEWBS'
w_upload_n-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO'
w_upload_n-newko.
ELSE.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'BSEG-WRBTR'
w_upload-wrbtr.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-ANLN1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDLOOP.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text .
REFRESH: it_bdcdata.
*& Form BDC_DYNPRO
FORM bdc_dynpro USING program dynpro.
CLEAR w_bdcdata.
w_bdcdata-program = program.
w_bdcdata-dynpro = dynpro.
w_bdcdata-dynbegin = 'X'.
APPEND w_bdcdata TO it_bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF fval <> space.
CLEAR w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
APPEND w_bdcdata TO it_bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form fr_format_message_text
FORM fr_format_message_text.
DATA: lf_msg TYPE string.
WRITE:/ sy-uline(125).
FORMAT COLOR 1 INTENSIFIED ON.
WRITE : /1 sy-vline,
2 text-041 , "'record Number',
16 sy-vline,
17 text-042 , " 'success/failure',
35 sy-vline,
36 text-043, " 'document no',
55 sy-vline,
56 text-044, "'Error details',
125 sy-vline.
WRITE:/ sy-uline(125).
LOOP AT it_bdcmsgcoll INTO w_bdcmsgcoll.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = w_bdcmsgcoll-msgid
lang = sy-langu
no = w_bdcmsgcoll-msgnr
v1 = w_bdcmsgcoll-msgv1
v2 = w_bdcmsgcoll-msgv2
v3 = w_bdcmsgcoll-msgv3
v4 = w_bdcmsgcoll-msgv4
IMPORTING
msg = lf_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc EQ 0.
WRITE:/01 sy-vline,
02 sy-tabix,
16 sy-vline,
17 w_bdcmsgcoll-msgtyp,
35 sy-vline,
36 w_bdcmsgcoll-msgv1,
55 sy-vline,
56 lf_msg,
125 sy-vline.
WRITE:/ sy-uline(125).
ENDIF.
ENDLOOP.
ENDFORM. "fr_format_message_text
Thanks in advance.Hi Neelima,
Just put the following code within that LOOP...ENDLOOP statement.
LOOP AT it_upload INTO lw_upload.
CALL TRANSACTION 'FB01' USING it_bdcdata
MODE 'N' UPDATE 'S' MESSAGES INTO it_bdcmsgcoll.
PERFORM fr_format_message_text .
REFRESH: it_bdcdata.
ENDLOOP.
Regards,
R.Nagarajan.
We can - -
BDC Call Transaction - Doc.No not getting generated in Message Internal tab
Dear All,
I am using BDC Call Transaction method for uploading data for transaction, Iam able to successfully capture the Error messages, sucess messages and the transaction number is also displayed for the bdc run in Mode A, but in case of scheduling the job in background, the Error messages are displayed but the transaction number is not captured in the message Internal table( BDCMSGCOLL).
Kindly look into the matter and revert back for any further info.
Regards
NareshHi,
Please try using the following kind of code in 'CALL TRANSACTION'
opt-dismode = 'E'. " Exclusive mode
opt-defsize = 'X'.
opt-updmode = 'S'.
opt-nobinpt = ' '.
CALL TRANSACTION transaction_code USING ft OPTIONS FROM opt
MESSAGES INTO t_bdcmsgcoll .
Hope this will work.
Thanks,
Leo -
VALUES not getting passed in t.code 'FMY3' VIA call transaction 'FMY3'
hi guru's,
i have created a ALV report for funds precommitment,when i click the document number,the respective document is not opening
i have coded like this
IF selfield-value IS NOT INITIAL.
READ TABLE final INDEX selfield-tabindex.
SET PARAMETER ID: 'KBL' FIELD final-belnr,
'KBP' FIELD final-blpos.
CALL TRANSACTION 'FMY3' AND SKIP FIRST SCREEN.
ENDIF.
the transaction is called,but with empty value in the field and the document is not opening....please help me with this regard...
thanks in advance,
regards,
Balaji.SHello Venkat.O,
i have a similar problem with the overwrite of the memory ID, when calling transaction FMY3. In the code block you mentioned, the system gets the right value from the memory ID, that i've set before calling the transaction. But i found that after that the system runs in the include LFMFRO01, the code
MODULE init_suppress OUTPUT.
IF status2 = st2_app. "/Genehmigen/Ablehnen
Lesen aus Memory: wird in WF-Methode 'APPROVE' gefüllt
IMPORT wfdata TO g_f_wfdata FROM MEMORY ID con_memid_wf.
IF NOT g_f_wfdata-belnr IS INITIAL.
IF g_f_wfdata-blpos = space.
g_f_wfdata-blpos = con_initial_blpos.
ENDIF.
kbld-belnr = g_f_wfdata-belnr.
and here the system gets the memory of the last document created and overwrites the selecion-screen field KBLD-BELNR with that value. And the value i had stored in the parameter ID 'MRV', and that the system gets it right in the code you show, is overwritten..
This seems like a bug from SAP, don't you think?
This way the system will always show the last doc. when calling transaction, after setting a parameter ID.. -
BDC Call Transaction : FS00(Create G/L Account)
Hi,
BDC of FS00 is running properly in Forground (A) Mode, with success messages and G/L account being created in SKB1 table.
But when I run it in Background (N) Mode, it is not creating the G/L account. Although I am getting the success messages in the end of the execution but in the table, there is no G/L account.
FORM fill_bdcdata .
loop at i_output.
clear i_bdcdata.
refresh i_bdcdata.
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-BUKRS'.
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'
i_output-SAKNR. "gl ac number
perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'
i_output-BUKRS. "company code
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'. "ac grp
*perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
i_output-cc.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'
i_output-xplacct. "pl account
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'
i_output-xbilk. "balance sheet
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=TAB02'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'
i_output-ktoks. "ac grp
perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'
i_output-xplacct. "pl account
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-TXT50_ML'.
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT20_ML'
i_output-txt20_ml. "short text
perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT50_ML'
i_output-txt50_ml. "long text
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-MITKZ'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XSALH'
i_output-xsalh. "Only Balance in Local Currency
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
i_output-mwskz. "Tax Category
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XMWNO'
i_output-xmwno. "Posting without tax
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-MITKZ'
i_output-mitkz. "Reccon A/C
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XOPVW'
i_output-xopvw. "Open Item Management
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XKRES'
i_output-xkres. "Line Item Display
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
i_output-zuawa. "Sort Key
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'=ENTER'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-FSTAG'
i_output-fstag. "Field Stauts
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XINTB'
i_output-xintb. "post automatically
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-XGKON'.
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XGKON'
i_output-xgkon. "relevent to cash A/c
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-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'
i_output-fstag. "Field Stauts
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XINTB'
i_output-xintb. "post automatically
perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-XGKON'
i_output-xgkon. "relevent to cash A/c
perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
perform bdc_field using 'BDC_OKCODE'
'/EEXIT'.
perform bdc_field using 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-XGKON'.
perform bdc_dynpro using 'SAPLSPO1' '0100'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform f_elog.
endloop.
FORM f_elog .
data len type i.
clear i_msgtab.
call transaction 'FS00'
using i_bdcdata
mode g_v_mode "N
messages into i_msgtab
update g_v_update . "S
write: i_output-saknr.
I am not getting where I am going wrong in the code.
Regards,
Priyanka.Hi,
Make the mode 'E' and see excatly, where the warning or errors or coming.
If you are having an currency or UOM ,related fields, see that the values should not be empty. If they are enpty. Put an if condition there and Quit filling such fields.
First keep in mode 'e' and debug. 100% you will see the warnings or errors, then tell me what is the error.
<b>call transaction 'FS00'
using i_bdcdata
mode g_v_mode "E
messages into i_msgtab</b>
Thansk'
Manju.
Maybe you are looking for
-
I received the error message MSVCR80.ddl and was advised to uninstall all itunes/apple files, which I did in the strict order they said. I then tried to reinstall Itunes 11 and while it comes up to say i have installed it, nothing is on my computer?
-
Hello, I have a Web Application using BC4J with an application module pool. So sometimes the passivation mechanism of application module occurs (I use passivation in database). I need to preserve the context of a user accross several requests, so my
-
Apogee duet 2007 can't be loaded into new imac
just got new imac and upgraded to logic 9. trying to set apogee duet, prompt says it's too old for snow leopard. went to apogee site and downloaded new driver but still won't work. running apogee through firewire 400 into Glyph hard drive in order to
-
Statistical delivery date in S.A
Hi Is it possible to get the statistical delivery date considering the inco terms, vendor transport time etc...in the Scheculing agreements without MRP run...?
-
IMac performance slow again after installing memory
Hi, I installed an extra 4g of ram in my iMac about 4 weeks ago (so now has 8g). Initiallly, it was super fast and very smooth. A couple of weeks on, performance has slipped. It feels as it did prior to installing. For example, I was running Logic