Hi guys please give me sample code for call transaction that handles error
hi guys, please give me sample code for call transaction that handles error,
please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code.
please do help me as it is urgent.
thanks and regards.
prasadnn.
Hi Prasad,
Check this code.
Source Code for BDC using Call Transaction
*Code used to create BDC
*& Report ZBDC_EXAMPLE *
*& Example BDC program, which updates net price of item 00010 of a *
*& particular Purchase order(EBELN). *
REPORT ZBDC_EXAMPLE NO STANDARD PAGE HEADING
LINE-SIZE 132.
Data declaration
TABLES: ekko, ekpo.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekko-ebeln,
waers TYPE ekko-waers,
netpr TYPE ekpo-netpr,
err_msg(73) TYPE c,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_error TYPE t_ekko,
it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_success TYPE t_ekko.
DATA: w_textout LIKE t100-text.
DATA: gd_update TYPE i,
gd_lines TYPE i.
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
TITLE text-002. "New NETPR value
PARAMETERS: p_newpr(14) TYPE c obligatory. "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
*START-OF-SELECTION
START-OF-SELECTION.
Retrieve data from Purchase order table(EKKO)
SELECT ekkoebeln ekkowaers ekpo~netpr
INTO TABLE it_ekko
FROM ekko AS ekko INNER JOIN ekpo AS ekpo
ON ekpoebeln EQ ekkoebeln
WHERE ekko~ebeln IN so_ebeln AND
ekpo~ebelp EQ '10'.
*END-OF-SELECTION
END-OF-SELECTION.
Check data has been retrieved ready for processing
DESCRIBE TABLE it_ekko LINES gd_lines.
IF gd_lines LE 0.
Display message if no data has been retrieved
MESSAGE i003(zp) WITH 'No Records Found'(001).
LEAVE TO SCREEN 0.
ELSE.
Update Customer master data (instalment text)
LOOP AT it_ekko INTO wa_ekko.
PERFORM bdc_update.
ENDLOOP.
Display message confirming number of records updated
IF gd_update GT 1.
MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
ELSE.
MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
ENDIF.
Display Success Report
Check Success table
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
Display result report column headings
PERFORM display_column_headings.
Display result report
PERFORM display_report.
ENDIF.
Display Error Report
Check errors table
DESCRIBE TABLE it_error LINES gd_lines.
If errors exist then display errors report
IF gd_lines GT 0.
Display errors report
PERFORM display_error_headings.
PERFORM display_error_report.
ENDIF.
ENDIF.
*& Form DISPLAY_COLUMN_HEADINGS
Display column headings
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records updated successfully:'(013).
WRITE:/ sy-uline(42).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(004), sy-vline,
(11) 'Old Netpr'(005), sy-vline,
(11) 'New Netpr'(006), sy-vline.
WRITE:/ sy-uline(42).
ENDFORM. " DISPLAY_COLUMN_HEADINGS
*& Form BDC_UPDATE
Populate BDC table and call transaction ME22
FORM bdc_update.
PERFORM dynpro USING:
'X' 'SAPMM06E' '0105',
' ' 'BDC_CURSOR' 'RM06E-BSTNR',
' ' 'RM06E-BSTNR' wa_ekko-ebeln,
' ' 'BDC_OKCODE' '/00', "OK code
'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'EKPO-NETPR(01)',
' ' 'EKPO-NETPR(01)' p_newpr,
' ' 'BDC_OKCODE' '=BU'. "OK code
Call transaction to update customer instalment text
CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
MESSAGES INTO messtab.
Check if update was succesful
IF sy-subrc EQ 0.
ADD 1 TO gd_update.
APPEND wa_ekko TO it_success.
ELSE.
Retrieve error messages displayed during BDC update
LOOP AT messtab WHERE msgtyp = 'E'.
Builds actual message based on info returned from Call transaction
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = messtab-msgid
msgnr = messtab-msgnr
msgv1 = messtab-msgv1
msgv2 = messtab-msgv2
msgv3 = messtab-msgv3
msgv4 = messtab-msgv4
IMPORTING
message_text_output = w_textout.
ENDLOOP.
Build error table ready for output
wa_error = wa_ekko.
wa_error-err_msg = w_textout.
APPEND wa_error TO it_error.
CLEAR: wa_error.
ENDIF.
Clear bdc date table
CLEAR: bdc_tab.
REFRESH: bdc_tab.
ENDFORM. " BDC_UPDATE
FORM DYNPRO *
stores values to bdc table *
--> DYNBEGIN *
--> NAME *
--> VALUE *
FORM dynpro USING dynbegin name value.
IF dynbegin = 'X'.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-program,
value TO bdc_tab-dynpro,
'X' TO bdc_tab-dynbegin.
APPEND bdc_tab.
ELSE.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-fnam,
value TO bdc_tab-fval.
APPEND bdc_tab.
ENDIF.
ENDFORM. " DYNPRO
*& Form DISPLAY_REPORT
Display Report
FORM display_report.
FORMAT COLOR COL_NORMAL.
Loop at data table
LOOP AT it_success INTO wa_success.
WRITE:/ sy-vline,
(10) wa_success-ebeln, sy-vline,
(11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
(11) p_newpr, sy-vline.
CLEAR: wa_success.
ENDLOOP.
WRITE:/ sy-uline(42).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. " DISPLAY_REPORT
*& Form DISPLAY_ERROR_REPORT
Display error report data
FORM display_error_report.
LOOP AT it_error INTO wa_error.
WRITE:/ sy-vline,
(10) wa_error-ebeln, sy-vline,
(11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
(73) wa_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form DISPLAY_ERROR_HEADINGS
Display error report headings
FORM display_error_headings.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(009), sy-vline,
(11) 'Netpr'(010), sy-vline,
(73) 'Error Message'(012), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. " DISPLAY_ERROR_HEADINGS
Hope this resolves your query.
Reward all the helpful answers.
Regards
Similar Messages
-
Need BDC code for Call Transaction of VL31N, which creates Inbound del.s,
Hi Experts,
Is any body does have the BDC (CALL TRANSACTION) code for VL31N transaction, where we can crete INBOUND deliveries from Purc Orders.
Actually, currently am doing by using FM - GN_DELIVERY_CREATE, but, its not given me a chance to incorporate BATCH SPLIT functionality. So, decided to go with BDC
1 - Is this VL31N is Okay for BDC, bcoz, some where I red that, since its a ENJOY tx, its NOT recommended?
2 - Is there any other FM, BAPI to create INBOUND deliveries from POs, which can take care of BATCH SPLIT functionality?
3 - BDC code for VL31N tx.
thanq
Edited by: Srinivas on Jul 29, 2008 1:47 PM1 - Is this VL31N is Okay for BDC, bcoz, some where I red that, since its a ENJOY tx, its NOT recommended?
yes you can do that .
2 - Is there any other FM, BAPI to create INBOUND deliveries from POs, which can take care of BATCH SPLIT functionality?
using BDC we can achieve the Barch split functionality.
3 - BDC code for VL31N tx.
Record using SHDB it will give you. -
Parameter ID to store OK code for call transaction
Hi All,
Does anybody know which parameter ID is used to store last OK code value for call tansaction VD02? In a customize program I use statement CALL TRANSACTION 'XD02'. Now I have to send an email notification if user click the save button and customers is chnaged successfully. In all other cases like back, exit there should not be any email notififcation. Any solution.
Regards,
SeemaHi,
There is not specific parameter id to store last OK code.
But since you have a the BDCDATA internal table in the program you can get the last entry and check if it save or not and do further processing based on it.
Regards
Sudhir Alturu -
Please can you give me sample code for badi
Dear Freinds
i have tried writing coding for the badi HRPAD00INFTY, but iam not able to get, my requirement is when the user enters for the ansal amount that amount
should be divided by 12 and should be defaulted for basic pay (p9008-bet01) based on the wage type (p9008-lga01=MFPY),
i have calculated the value as , but now i have to assign the value to p9008-bet01.
please let me know how i should code.
i am giving the code which is have written can you please let me know where i am wrong
method IF_EX_HRPAD00INFTY~AFTER_INPUT.
data: wa_pa0008 type pa0008.
select Single * from pa0008 into wa_pa0008 where pernr = NEW_INNNN-pernr .
if wa_pa0008-lga01 = 'MFPY'.
new_innnn-bet01 = wa_pa0008-ansal / 12 -
here iam not able to assign
endif.
endmethod.
regards
syamlaHi pranesh
thanks for replying , but the only problem is i have to default the value
for bet 01 from ansal
ie from p0008-ansal to q0008-bet01.
then only the method
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = new_innnn
IMPORTING
pnnnn = wa_0008. " wa_9008
will trigger for me and th wa_0008 will be filled up.
since when i say create 0008 , then if i entering for ansal then i asking for entering
value for q0001-bet01 , since the wage type for which i have to default the bet01
will be there on the screen before only, so the screen expects that i have to enter the value for amount bet01, so that measn bet01 becomes mandatory,
the method will work for me if iam able to make the bet01 being filled automatically from the calcualtion ( as per my requiremnt) i.e ansal/100.
regards
shanti -
Please give the complete code for the below problems with action page and Form.
Create an array, which is holding ‘n’ strings (words), , and implement the functionality to search given string is present in the array. Give an option to the user to enter the word to be searched
Create a static array of ‘n’ numbers , and implement the functionality to search given number is present in the array. Give an option to the user to enter the number to be searched
Implement the functionality to search given word is present with in the predefined sentence. Give an option to the user to enter the word to be searchedAs haxtbh has pointed out, these forums are for HELPING you fix code you've already tried and are having issues with. We aren't here to write your code, whether for a project or homework, from scratch. We can only help you if you help us by making an attempt.
V/r,
^_^ -
Please give me some code for file upload. I am working in websphere
Hi,
I have made the form with encript = multipart. with four text field to enter some information about the file. now i want to upload a file f1.txt in the folder project.com.dos.files. And also I want to make appear the file and the four information regarding that file in a another jsp page as grids.
Please help how to do that. I am using Websphere Studio Application Developer. Please help with some codeCheck out the fileupload package in the apache commons project
-
Sample code for calling web services for export
Hi I am trying to use web service ExportProject to export a project out of Primavera DB. The Export service uses MTOM (Message Transmission Optimization Mechanism) to send the output files as attachments. Need some information on
- Can the export service be specified a location for the transfer? or it will come attached in the response?
- How do i access this attachment? I am using PL/SQL for doing this.
Any help will be appreciated.I am not a pl/sql guy but there is a java example in the demo code that might help you figure out a pl/sql approach.
Look in WSDemo.java in the exportProject method. The WSDemo.java file was located in the following directory on my system: \Oracle\P6EPPM\ws\demo\Java\JAX-WS\src\com\primavera\wsclient\demo
Gene -
Want to code for call transaction and session method
my requriment is i upload a data by call tran. but i want to error handling through session method pls give the code and i want to flat file also.
asap.
a.kI suggest you try fulfilling your requirements yourself and come back with specific problems along the way.
-
Sample Code for CRM enhancement in BADI
hi,
can anybody please give me sample code for BADI for CRM enhancement.
i have added couple of z field in a extract structure. now i have to write code in BADI to populate those fields.
please do not send code for user exit.
Regards
SubrataHi Aviral,
Please consider below thread :
http://scn.sap.com/thread/2069370
Best regards - Christophe -
Hi All,,
Please give Entire BDC code for MM01 Transaction.
i will change as per my requirement.
I think this is already done by some ABAP Consultants.
plz dont give answers like do recording for that transaction MM01. I know recording...
For time constraiint, I have to complete soon.....
Thanks in Advance
BestRegards,
AnilHi,
The below code is using the Session Method
report ZDS_BDC_MM01
no standard page heading line-size 255.
include bdcrecx1.
*parameters: dataset(132) lower case.
*** DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
* If it is nessesary to change the data section use the rules:
* 1.) Each definition of a field exists of two lines
* 2.) The first line shows exactly the comment
* '* data element: ' followed with the data element
* which describes the field.
* If you don't have a data element use the
* comment without a data element name
* 3.) The second line shows the fieldname of the
* structure, the fieldname must consist of
* a fieldname and optional the character '_' and
* three numbers and the field length in brackets
* 4.) Each field must be type C.
*** Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record OCCURS 0,
* data element: MATNR
MATNR_001(018),
* data element: MBRSH
MBRSH_002(001),
* data element: MTART
MTART_003(004),
* data element: XFELD
KZSEL_01_004(001),
* data element: XFELD
KZSEL_02_005(001),
* data element: MAKTX
MAKTX_006(040),
* data element: MEINS
MEINS_007(003),
* data element: MAKTX
MAKTX_008(040),
end of record.
*** End generated data section ***
start-of-selection.
*perform open_dataset using dataset.
perform open_group.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME ='C:\DHRUV.TXT'
FILETYPE = 'DAT'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = RECORD
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.
*do.
LOOP AT record.
*read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
record-MATNR_001.
perform bdc_field using 'RMMG1-MBRSH'
record-MBRSH_002.
perform bdc_field using 'RMMG1-MTART'
record-MTART_003.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
record-KZSEL_01_004.
perform bdc_field using 'MSICHTAUSW-KZSEL(02)'
record-KZSEL_02_005.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX_006.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
record-MEINS_007.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX_008.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM01'.
*enddo.
ENDLOOP.
perform close_group.
*perform close_dataset using dataset.
*Text elements
* E00 Error opening dataset, return code:
* I01 Session name
* I02 Open session
* I03 Insert transaction
* I04 Close Session
* I05 Return code =
* I06 Error session created
* S01 Session name
* S02 User
* S03 Keep session
* S04 Lock date
* S05 Processing Mode
* S06 Update Mode
* S07 Generate session
* S08 Call transaction
* S09 Error sessn
* S10 Nodata indicator
* S11 Short log
*Messages
* Message class: MS
*613 Please enter a session name and user name
The Below is the coding for the Call Transaction...
report ZDS_BDC_MM01_2
no standard page heading line-size 255.
*include bdcrecx1.
*parameters: dataset(132) lower case.
*** DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
* If it is nessesary to change the data section use the rules:
* 1.) Each definition of a field exists of two lines
* 2.) The first line shows exactly the comment
* '* data element: ' followed with the data element
* which describes the field.
* If you don't have a data element use the
* comment without a data element name
* 3.) The second line shows the fieldname of the
* structure, the fieldname must consist of
* a fieldname and optional the character '_' and
* three numbers and the field length in brackets
* 4.) Each field must be type C.
*** Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record OCCURS 0,
* data element: MATNR
MATNR_001(018),
* data element: MBRSH
MBRSH_002(001),
* data element: MTART
MTART_003(004),
* data element: XFELD
KZSEL_01_004(001),
* data element: MAKTX
MAKTX_005(040),
* data element: MEINS
MEINS_006(003),
* data element: MTPOS_MARA
MTPOS_MARA_007(004),
end of record.
DATA: FLNAME TYPE STRING.
*** End generated data section ***
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*** MESSAGE******
DATA: BEGIN OF MESSTAB OCCURS 0.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: MATNR TYPE MARA-MATNR,
END OF MESSTAB.
****END OF MESSAGE****
PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = FILENAME.
start-of-selection.
*perform open_dataset using dataset.
perform open_group.
FLNAME = FILENAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FLNAME
FILETYPE = 'DAT'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = record
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.
LOOP AT record.
DATA:
CNT TYPE I.
CNT = CNT + 1.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
record-MATNR_001.
perform bdc_field using 'RMMG1-MBRSH'
record-MBRSH_002.
perform bdc_field using 'RMMG1-MTART'
record-MTART_003.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
record-KZSEL_01_004.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX_005.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
record-MEINS_006.
perform bdc_field using 'MARA-MTPOS_MARA'
record-MTPOS_MARA_007.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
*perform bdc_transaction using 'MM01'.
CALL TRANSACTION 'MM01' USING BDCDATA
MODE 'N'
UPDATE 'A'
MESSAGES INTO MESSTAB.
READ TABLE MESSTAB INTO MESSTAB INDEX CNT.
IF MESSTAB-MSGTYP = 'E'.
MESSTAB-MATNR = RECORD-MATNR_001.
MODIFY MESSTAB INDEX CNT FROM MESSTAB. " TRANSPORTING MATNR.
ENDIF.
ENDLOOP.
FORM OPEN_GROUP.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = 'MM01'
USER = SY-UNAME
KEEP = 'X'.
ENDFORM.
FORM BDC_INSERT.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'MM01'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
TABLES
DYNPROTAB = BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 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.
ENDFORM.
END-OF-SELECTION.
LOOP AT MESSTAB.
IF MESSTAB-MSGTYP = 'E'.
WRITE:/ 'ERROR OCCURED ON MATNR = ',MESSTAB-MATNR , 'MESSAGE : MATNR ALREADY EXISTS IN MARA!!!'.
ENDIF.
ENDLOOP.
perform close_group.
*perform close_dataset using dataset.
*& Form close_group
* text
* --> p1 text
* <-- p2 text
FORM 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.
ENDFORM. " close_group
*& Form bdc_dynpro
* text
* -->P_0270 text
* -->P_0271 text
FORM bdc_dynpro USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. " bdc_dynpro
*& Form bdc_field
* text
* -->P_0275 text
* -->P_0276 text
FORM bdc_field USING FNAM FVAL.
IF FVAL <> ' '.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. " bdc_field
*Text elements
* E00 Error opening dataset, return code:
* I01 Session name
* I02 Open session
* I03 Insert transaction
* I04 Close Session
* I05 Return code =
* I06 Error session created
* S01 Session name
* S02 User
* S03 Keep session
* S04 Lock date
* S05 Processing Mode
* S06 Update Mode
* S07 Generate session
* S08 Call transaction
* S09 Error sessn
* S10 Nodata indicator
* S11 Short log
HTH
Regards,
Dhruv Shah -
Hi All! I want to use javaFX controles in vaadin applications pls give some sample code
Hi All!
I want to use javaFX 2.0 Controles in Vaadin applications please give some sample code.
Is it possible or not .
RegardsHi,
Thanks manish for your reply but i could not get any help from your suggesion because i have know idea in Java.
I want to know how can we deploy jsp files in Oracle bpel.
Because i'm not getting the proper way to deploy jsp files in oracle bpel.
Can any one help me out by providing step by step information or suggest any url to resolve this.
Regards,
Nikhil Kumar Jain -
Routine sample code for reading 2 fields from existing DSO
Hi Gurus,
I am a monkey when it comes to write ABAP code. I have one DSO-A where we store accounting info of purchading (from DS 2lis_02_acc) and one DSO-B getting data from 2lis_02_scl data source.
We need to write a rountine to read DSO-A for G/L account and populate DSO-B G/L account field.
Please provide me the sample code for this.
Warm Regards,
AnilHi anil,
Create a local table this is type of you source,
Data : LV_table TYPE XXXX
use the select statement to read the table of DSO .You have to use th active table for the dso that you want to read data from.
Select xxxfieldxxx FROM /BIC/A..........50
into lv_table where
filed name of of scheule line probably order no and item no .
<soruce-fields>-IOBELN = IOBELN
and <source-fields>-IOBELP = IOBELP.
Checke the techinal name i am not sure about it. It will be something like that.
Cheers mate -
i had to take my photoshop file into a hardrive because my dad was going to give me a new Mac and when things didn't work out and went back to my old one i use the time capsule thing to save everything before but didn't give me photoshop so i physically moved the file and tried to open it but then this error shows up
Please uninstall and reinstall the product.
If this problem still occurs, please contact Adobe technical support for help, and mention the error code shown at the bottom of this screen.
Error: 16
and when i click the uninstall app on the file it tells me this
The alias “Uninstall Adobe Photoshop CS6 2” can’t be opened because the original item can’t be found
and when i click fix alias i click on photoshop and the app just turns into photoshop and i just run in circles
please help thank youRun the cleaner tool and reinstall.
Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
Download CS6 products
Mylenium -
Sample code for slow moving material report?
Hi all,
I have a requirement to display slow moving mateial report on a particular goods issue date and material wise.
The basic requirements are
1. Movement type '261' and material, plant are select-options.
2.last goods movement date based on parameter.
3. Display the quantity available
but here i am getting a problem that i couldn't find the last goods movement for that particular material with specific storage location as one material document containing more than one item. So please help? Also what logic i have to use to display quantity available?
Please specify the sample code or logic for above requirement?
Any custom slow moving report codes also very helpful?
Thanks,
Vamshi>
VAMSHI KRISHNA wrote:
> Solved.
....Shaved. -
ABAP Sample code for HR_MAINTAIN_MASTERDATA
Hi folks,
I want to delimit a record in the HR master Table wi the help of Function Module HR_MAINTAIN_MASTERDATA, but its not updating HR master table correctly so please send me some sample code for that function module.
usefull points will rewarded.
Reg,
Hariharanhi
good
check with this code
Call update function module:
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = SS300_0001T-PERNR
ACTIO = OPERATION
BEGDA = VALIDITYBEGIN
ENDDA = '99991231'
SUBTY = SPACE
NO_ENQUEUE = SPACE
IMPORTING
RETURN1 = RETURN
TABLES
PROPOSED_VALUES = VALUES
MODIFIED_KEYS =
EXCEPTIONS
OTHERS = 1.
IF RETURN IS INITIAL.
CONCATENATE SS300_0002-VORNA SS300_0002-NACHN
INTO ENAME SEPARATED BY SPACE.
CONDENSE ENAME.
MESSAGE S006 WITH ENAME SPACE.
ELSE.
MESSAGE ID RETURN-ID
TYPE 'S'
NUMBER RETURN-NUMBER
WITH RETURN-MESSAGE_V1 RETURN-MESSAGE_V2
RETURN-MESSAGE_V3 RETURN-MESSAGE_V4.
ENDIF.
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0ce464dc8b11d2803800c04f99fbf0/content.htm
reward point if helpful.
thanks
mrutyun^
Maybe you are looking for
-
Hp probook 4540s .. Finger print sensor is not appearing in hp protect tools
Hello ...<br>I've recently bought HP Probook 4540s and everything works fine except the finger print sensor<br><br>My labtop has windows 8 installed and all drivers and devices are workig fine but the finger print sensor is not appearing in the windo
-
Display Lable Of Item Conditionaly.
Hi, Can We display Lable Of item Conditionaly. if yes then how can i do this . where should i put condition. Actully i want to display single item for Hotel and transport Category. If i use hotel then Item Lable Name of item would be Hotel Name and i
-
How to Transfer Database Table Field to Data Type in XI
Dear All, Dear All, I am working on scenario to transfer data(Database Table) from Non SAP System to SAP system through XI. While Defining "Data Type" in XI i want to create Data Type as of Database table in my(Oracle Database).There is any direct me
-
How to install ABAP as a backend system in my EHP1
I have successfully installed EHP1 composition enviornment from SDN , now i m able to work on NWDS for JAVA and Enterprise portal . it contains java application server . but in order to get data from ABAP Backend system from NWDS(JAVA) , I don't have
-
ITUNES WON'T INSTALL! HELP HELP HELP!
So for the past week I've been trying to download the new iTunes 10.6.3 but it won't work, NOTHING works! I've literally been searching everything but the same screen pops up every time saying, "the installer encountered errors before iTunes could be