Exiting LDB in custom program but contiue with further execution....
Hello Gurus,
I have a program attributed a logical database 'VAV'. I have a parameter after the logical selection field for maxium transaction hits. If the logical database selection exceeds the maximum hits , then I want the logical database selection to exit from further selection looping and go to next executable statement.
In case below, the next executable statement is (WRITE:/ 'Success'.). But I see that the program exits completely instead of going to the next execuatble statement. How can make program execution to go to exit LDB selection loop but still continue with further execution after maximum hit is encountered.
DATA: i_counter type i.
SELECTION-SCREEN BEGIN OF BLOCK BSD2 WITH FRAME Title text-025.
parameters: max_tran(8).
SELECTION-SCREEN END OF BLOCK BSD2.
NODES: vbak, vbap.
start-of-selection.
GET VBAK FIELDS KUNNR BSARK AUART VBELN BSTNK AUDAT AUGRU ERNAM VKBUR.
if not max_tran is initial.
i_counter = i_counter + 1.
if i_counter GT max_tran.
EXIT FROM STEP-LOOP.
endif.
endif.
end-of-selection.
write:/ 'success'.
Regards,
Jainam.
Edited by: Jainam Shah on Feb 26, 2009 6:26 PM
Try to remove
EXIT FROM STEP-LOOP
and include only
EXIT
Please check demo program DEMO_PROGRAM_EXIT_1 & DEMO_PROGRAM_EXIT_2
a®
Similar Messages
-
How can we use the standard LDB in custom program.
Dear all,
can you please tell me the way , how can we use the standard LDB in custom program.
Thanks & Regards,
Jyothi.Hi
You can use the Function module LDB_PROCESS to use the Standard LDB in your Z custome program for further details about using the Standard LDB and accessing the LDB in to the program search SDN
http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/97/b3edb8163111d2953c0000e8353423/frameset.htm -
Moderator message - please use meaningful subject in future
Hi,
My requirement is :
We get a input file in .XLS format. To load, it has to be converted to .TXT format. But this conversion sometimes creates junk characters in the load file.
so to rectify it we need to build a custom program and then Pass the .XLS file as input file for custom program
then Convert it to .TXT and download it
Then read .XLS cell by cell and compare it with the .txt format which just downloaded.
I am building a custom program but while downloading using gui_download i am getting a dump.
how do i go about it.any pointers will be helpful.The piece of code i am using is:
DATA : it_tab TYPE STANDARD TABLE OF alsmex_tabline.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_dpath
i_begin_col = c_begin_col
i_begin_row = c_begin_row
i_end_col = c_end_col
i_end_row = c_end_row
TABLES
intern = it_tab
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = p_dpath
* FILETYPE = 'ASC'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
data_tab = it_tab
* FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Please give pointers on this.
Regards,
Rahul
Edited by: Matt on Jan 29, 2009 2:13 PM - added tagsALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = pfile
TABLES
i_tab_converted_data = lt_excel[].
* 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\Documents and Settings\chenna.kesava.reddy\Desktop\Book1.txt'
FILETYPE = 'ASC'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
CONFIRM_OVERWRITE = 'X'
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH = '2000'
tables
data_tab = lt_excel.
* FIELDNAMES =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edited by: Matt on Jan 29, 2009 2:14 PM - added tags -
Logical database sdf in custom program not triggering selection screen?
I added logical Database SDF (screen 905) to a custom program - but the selection screen is not getting triggered.
Do I have to associate these somewhere?
Thanks,
VenHI,
Declare this statement after the Report Statement in the program.
TABLES : SKA1, SKB1.
You will get the selection screen now. -
Custom Interface Program Errors out with ORA-01722: invalid number in R12
Hi,
We were upgrading to R12 in which our custom interface load program errors out with "ORA-01722: invalid number". Please find structure of control file as below :
LOAD DATA
APPEND
INTO TABLE RRAT_RCAP_GIO_MAN_ADJ_STG
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED by '"'
TRAILING NULLCOLS
PERIOD_NAME CHAR "ltrim(rtrim(:PERIOD_NAME))"
,SOURCE_TYPE CHAR "ltrim(rtrim(:SOURCE_TYPE))"
,ADJ_ACCOUNT CHAR "ltrim(rtrim(:ADJ_ACCOUNT))"
,USD_NET INTEGER EXTERNAL
,ERROR_CODE CONSTANT 'LOADED DATA'
,PROCESS_FLAG CONSTANT 1
,CREATED_BY "fnd_global.user_id"
,CREATION_DATE sysdate
,LAST_UPDATED_BY "fnd_global.user_id"
,LAST_UPDATE_DATE sysdate
,LAST_UPDATE_LOGIN "fnd_global.login_id"
,REQUEST_ID "fnd_global.conc_request_id"
=====================================Log file ================
Record 1: Rejected - Error on table "XXATORCL"."XXAT_VCAP_GIO_MAN_ADJ_STG", column USD_NET.
ORA-01722: invalid number
===================sample file ==========================
JUL-11,Manual,8213-880011-00000000-259390-1Z-0000-0000,1001
JUL-11,Manual,8213-880011-00000000-253701-1Z-0000-0000,73
==========================================
I had tried with last successfully uploaded file as well which is also now not uploading.
Please help me in this issue.
Thanks,
Piyushi am using R12 now. Please avoide INTEGER EXTERNAL part from the control file. please refer below :
LOAD DATA
APPEND
INTO TABLE RRAT_RCAP_GIO_MAN_ADJ_STG
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED by '"'
TRAILING NULLCOLS
PERIOD_NAME CHAR "ltrim(rtrim(:PERIOD_NAME))"
,SOURCE_TYPE CHAR "ltrim(rtrim(:SOURCE_TYPE))"
,ADJ_ACCOUNT CHAR "ltrim(rtrim(:ADJ_ACCOUNT))"
,USD_NET
,ERROR_CODE CONSTANT 'LOADED DATA'
,PROCESS_FLAG CONSTANT 1
,CREATED_BY "fnd_global.user_id"
,CREATION_DATE sysdate
,LAST_UPDATED_BY "fnd_global.user_id"
,LAST_UPDATE_DATE sysdate
,LAST_UPDATE_LOGIN "fnd_global.login_id"
,REQUEST_ID "fnd_global.conc_request_id"
====================
Srini,
Just one thing i want to explain you that previously it was working fine but suddenly (might after upgrading in R12) started giving error. I had tested with old data files also which were loaded successfully in the system. but now it is giving error. Please help me in this issue.
Regards, -
How to create an install medium of Windows 8 with custom programs (like an OEM install)
Hello all,
I am interested in setting up a small business of making PCs for people around my area, and was curious if there was any way I could install Windows 8.1 on those computers with custom programs (i.e. Browsers, Anti-virus, etc.), but not have to create a user
account to do so? I want people to get these computers and go through the regular setup account process when they turn them on for the first time, just like with any computer from a regular OEM. Basically, I am trying to create my own OEM instillations of
Windows.
Thanks for any help, and let me know if I need to clarify anything.
GrahamHi,
Andreas is right, we have many ways to deploy Windows 8.1 like OEM.
You can also try the ADK:
Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1
http://www.microsoft.com/en-hk/download/details.aspx?id=39982
The Windows ADK enables two key scenarios: Windows deployment and Windows assessment.
Windows Deployment is for OEMs and IT professionals who customize and automate the large-scale installation of Windows on a factory floor or across an organization.
Kate Li
TechNet Community Support -
Copying standard prog to custome program with includes that includes hd inc
Hi gurus,
i got one requirement,
I have to copy standard program to custome program with includes ,that includes con tain few more includes. so how can i copy all the includes into the custome progam.
please tel me.Hi Vijayam,
In SE38, give the name of the standard program, in menubar goto program -> copy, which will take you to a pop up, check the checkbox for 'INCLUDES' to copy all the standard includes. But this will not copy the custom includes(starting with Z). To copy the custom include, you need to create new include in your copy program.To create a new include, click on icon 'Display Object List' which will display the objects list for your program, now right click on your program name in this list and select CREATE-> INCLUDE. Give the name of include and now copy the code from standard program include to your include.
I hope your problem is solved now.
Regards,
Pranjali -
trying to login to software program known as hamspher (vip simulated ham radio, it downloaded the program but it will not allow me to login with call sign and pin. it has to be opened with what they call a jar file. how do i do this?
This is compatible with Mac? Especially Snow Leopard (if that is what you'e running)?
Have you considered posting your question in their forums?
Here is some information re. the jar file:
http://ostermiller.org/opening_jar_files.html -
i have a mac osx version 10.6.8 no windows installed and i am trying to install a program but keep getting can not run in dos mode ( the disk says on back works on intel mac with parallels or vm fusion) is this program not compatible with my mac?
You run Windows in Parallels or Fusion. Then in Windows you install the program.
-
I have enrolled for the apple developer program but apparently already have an account with iBooks, cant have this it seems.how do I change my iBooks account, is this the apple id for my iPad and if I change this will it cause problems accessing iTunes etc?
I guess nobody knows if the crash that occured was legitimate or not? Apple phone support could do nothing for me, so I guess I am left to drive 45 minutes to the nearest store.
-
My audio files no longer sync to the in the 5d in camera audio. It did when I bought the program but no longer does I reinstalled and it still will not sync the files recorded on the H4N with the Canon 5D Mark II Camera.
The program used to import and transcode the Can 5D footage but no longer does. The program freezes often and looses my projects as well. Hard to make a living when your editing program is on strike!My audio files no longer sync to the in the 5d in camera audio. It did when I bought the program but no longer does I reinstalled and it still will not sync the files recorded on the H4N with the Canon 5D Mark II Camera.
The program used to import and transcode the Can 5D footage but no longer does. The program freezes often and looses my projects as well. Hard to make a living when your editing program is on strike! -
I purchased Label Printer Pro 7, but it does not work. It crashes. I press print, and the program closes. I press save, and the program closes. I press print and the program closes. I have had an email exchange with Pabel Printer Pro 7, but the best they could offer was to go to Utilities and click on fixed permssions. I have done that several times, and the program still doesn't work.
Can you please recommend an address.shipping label program that works with Avery labels that I can purchase, and that is also simple to use?
Thanks,
PaulaI purchased Label Printer Pro 7, but it does not work. It crashes. I press print, and the program closes. I press save, and the program closes. I press print and the program closes. I have had an email exchange with Pabel Printer Pro 7, but the best they could offer was to go to Utilities and click on fixed permssions. I have done that several times, and the program still doesn't work.
Can you please recommend an address.shipping label program that works with Avery labels that I can purchase, and that is also simple to use?
Thanks,
Paula -
APP - Custom program created with smart forms
Hi Experts,
In the automatic payment program, the ABAPer has created a custom program for payment methods for check. The program is assigned in the payment method for country in the payment program. However went the APP is run we are unable to generate a printout for the check payment. Also when the program is run in SE38 we are able to generate the output. The forms have not been assigned in the payment method country as he is not using SAP script and is using a samrt forms. Any pointers as to where we have missed out would be really useful.
Thanks,
SaiHI,
Goto table likp and pass the delivery note to LIFEX field and get the delivery number if the output type is abc then print this delivery number.
else
with above logic u have delivery number go to VBFA table pass the delivery number as Subsequent sales and distribution document and Document category of preceding SD document as O (Order ) then you will get the sales order.. then goto VBSS table and pass the sales order number that you just got and get required field from VBSS.
Thanks
Mahesh -
I am trying to trigger a custom event using a program but does not work ..
HI ....i am trying to trigger a custom event of a custom object type using a program but does not work. If trigger the same event using SWUE it works.
below is the code...
{Key = '0010001115'. "Sales Order Number (hard-coded)
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'ZXXXXXXXF'
objkey = KEY
event = 'ZEVENT'
CREATOR = ' '
TAKE_WORKITEM_REQUESTER = ' '
START_WITH_DELAY = ' '
START_RECFB_SYNCHRON = ' '
NO_COMMIT_FOR_QUEUE = ' '
DEBUG_FLAG = ' '
NO_LOGGING = ' '
IDENT =
IMPORTING
EVENT_ID =
RECEIVER_COUNT =
TABLES
EVENT_CONTAINER =
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2}
Please guide me if i am missing something.Hi Sunny,
I think you should try creating the event using FM SAP_WAPI_CREATE_EVENT.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZXXXXXXXF'
OBJECT_KEY = key
EVENT = 'ZEVENT'
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
* IFS_XML_CONTAINER =
IMPORTING
RETURN_CODE = rcode
EVENT_ID = event_id
* TABLES
* INPUT_CONTAINER =
* MESSAGE_LINES =
* MESSAGE_STRUCT =
Regards,
Saumya -
How to create a workflow dealing with customizing program(Add-on program)
Dear ALL,
I am new to workflow and I was assigned to create a workflow related to an customizing program(Dynpro screen).
I know we can refer to some std. template for workflow developing.
However, I don't know how to create a brand new workflow to deal with the add-on program and table.
My major difficulty is how to create a new object:
--How to create the new event to track the operation of add-on program, for example, push 'submit' button.
--How to create method to update the add-on table.
I do hope someone could give me some guidance.
Thank,
GaryThis is a Function Module that triggers an event ob Business Object tht you will create by making a subtype of Business Object. Use Transaction Code SWO1 to do so.
FUNCTION zwf_process_trip.
""Local Interface:
*" IMPORTING
*" VALUE(I_EMP_NUMBER) TYPE PERNR_D
*" VALUE(I_EMP_TRIP) TYPE REINR
INCLUDE <cntn01> .
DATA:i_emp_details TYPE STANDARD TABLE OF p0001, "Employee Details
wa_request TYPE p0001, "Workarea for Employee details
v_country_grp TYPE molga, "Country SubGrouping
v_object_key TYPE sweinstcou-objkey. "Key for the buisness object ZWOBUSTRIP
CONSTANTS: c_bo_trip TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
c_event_trip TYPE swo_event VALUE 'TripCreate',
c_infy_type_1 TYPE infty VALUE '0001'.
Event Container declaration
swc_container i_event_cont.
swc_create_container i_event_cont.
Reading the INFO TYPE 0001 to obtain the
Employee details
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = i_emp_number
infty = c_infy_type_1
begda = sy-datum
endda = sy-datum
TABLES
infty_tab = i_emp_details
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SY-SUBRC check is not required as the error
handelling will be done by WorkFlow rule
resolution.
CLEAR wa_request.
READ TABLE i_emp_details INTO wa_request INDEX 1.
IF sy-subrc = 0.
Retrieving the Country SubGrouping for the employee
SELECT SINGLE molga
FROM t001p
INTO v_country_grp
WHERE werks = wa_request-werks
AND btrtl = wa_request-persk.
ENDIF.
Sending the relevant data to event container
swc_set_element i_event_cont 'EmpId' i_emp_number.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'PersonnelArea' wa_request-werks.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpSubGrp' wa_request-persk.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpTripId' i_emp_trip.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
Raising the event to trigger the workflow
v_object_key = i_emp_number.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = c_bo_trip
objkey = v_object_key
event = c_event_trip
TABLES
event_container = i_event_cont
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
SWEL Transaction Code is used to track event linkage.
SWUS is used to test Workflow manually with single test.
<b>Please reward points if useful</b>
Thanks
Arghadip
Maybe you are looking for
-
Hi, On Friday we have switched databases to V12 version as it was announced that they are now generally available, but I have doubts that everything was tested by Microsoft, as immediately we have several issues: 1. We had automated backups scheduled
-
Problems with Java Dictionary Tables
Hi Experts, I have some problems with the Java Dictionary tables that I have created for my application. There are around 15 dictionary tables, each one of them having several hundred records, added in due course. As much as I understand these tables
-
Playing on viewer is fine but not on output
I play timeline and out put to vcr to record my project. The canvuas show playing but not on output. It freezes. I read other people that happen to them. I try to reset canvas fit to window but it still happen freeze again. Is there anyway other to r
-
Regarding BAPI_ENTRYSHEET_CREATE .
Hi All, We are trying to create Service entry sheet using BAPI_ENTRYSHEET_CREATE using the follwonig code: DATA: wa_header TYPE bapiessrc, i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE, ws_entrysheet_no TYPE bapiessr-sheet_no, i_service TYPE
-
Can't import HD video?!
Hi all, How can I import a MTS format video into IMovie 8? thanks little star