Sample code to dynamically append bytes to pdf
Hi,
I need to dynamically append bytes to pdf. It would be great if some one post sample code for that.
Thanks,
Veerabhadrarao
user10710231 wrote:
i am unable to append the bytes to pdf file . Can you send me some code snippet.It is unnecessary to ask someone to invest time in you when you can easily google for the hundreds or thousands of example snippets already out there. You know what to look for now, now make some effort yourself. Its like asking someone to go buy a tooth brush for you when you know there is one somewhere upstairs, you just refuse to go look for it and make someone else do the work.
Similar Messages
-
Sample code for offline PDF forms submit to workflow
Hi,
I have a XDP form which needs to be submitted offline by the user. So i have saved the XDP as dynamic PDF. On submit of this PDF the code flows to the servlet. I am getting the following error:
"com.adobe.formServer.interfaces.ProcessFormSubmissionException: RequestBuffer not specified at com.adobe.formServer.client.EJBClient.processFormSubmission(EJBClient.java:454) at samples.triggerworkflow.servlet.ProcessFormServlet.doPost(ProcessFormServlet.java:54) at samples.triggerworkflow.servlet.ProcessFormServlet.doGet(ProcessFormServlet.java:28) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at.... "
Finally i need to trigger the workflow from the servlet.
Please help me fix this error. Pleas eprovide a sample code if you have.
My servelt code is:
package samples.triggerworkflow.servlet;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import com.adobe.formServer.client.*;
import com.adobe.formServer.interfaces.*;
import com.adobe.idp.*;
import com.adobe.workflow.client.*;
import com.adobe.workflow.manager.*;
import samples.util.*;
* @version 1.0
* @author
public class ProcessFormServlet extends HttpServlet implements Servlet {
private static String failedHTML = "Process Invocation Failed. See Log";
* @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doPost(req, resp);
* @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
EJBClient formServer = new EJBClient(Util.getInitContext(getServletContext()));
IOutputContext form = null;
try {
IOutputContext outputContext =formServer.processFormSubmission(req,"OutputType=0");
// Determine the content type -- make sure it is text/xml
String ct = outputContext.getContentType();
if ((ct.equals("text/xml"))||(ct.equals("application/vnd.adobe.xdp+xml")))
// Get the length of the output stream
int outLength = outputContext.getOutputContent().length;
// Create a byte array and allocate outLength bytes
byte[] formOutput = new byte[outLength];
// Populate the byte array by invoking getOutputContext
formOutput = outputContext.getOutputContent();
System.out.println("coming in post 5555***********");
} catch (ProcessFormSubmissionException e1) {
System.out.println("coming in exception 123***********");
e1.printStackTrace(resp.getWriter());
return;
String returnHtml = triggerWorkflow(form);
resp.setContentType("text/html");
resp.setContentLength(returnHtml.length());
resp.getWriter().print(returnHtml);
private String triggerWorkflow(IOutputContext form) {
System.out.println("coming in triggerWorkflow 1111***********");
QLCSession session = null;
String html = null;
try {
System.out.println("coming in try of triggerWorkflow 2222***********");
session = QLCSessionFactory.createSession("Localhost");
Context wkfContext = session.login("administrator", "password");
session.setContext(wkfContext);
System.out.println("coming in try of triggerWorkflow 3333***********");
ProcessManager manager = session.getProcessManager();
System.out.println("coming in try of triggerWorkflow 4444***********");
manager.setContextFigured out how to set an event parameter in the function:
CALL METHOD event_container->set
EXPORTING
name = 'Item'
value = wa_eban-bnfpo -
Sample C# code to combine 1 or more pdfs
Hi All,
I was wondering If any of you have a sample C# code to combine 1 or more pdf files into one PDF using Adobe acrobat?
Thanks
MaheshTry the SDK forum.
-
Change this code to dynamic(field symbols)
hi,
i do this code and it working o.k. but i wont to change it to dynamic code like field symbols what is the best way to do that?
i reward
Regards
LOOP AT pro_tab into wa_pro.
CASE wa_pro-period+0(2).
WHEN '01'.
MOVE wa_pro-epop TO wa_tr-month1.
WHEN '02'.
MOVE wa_pro-epop TO wa_tr-month2.
WHEN '11' .
MOVE wa_pro-epop TO wa_tr-month11.
WHEN '12' .
MOVE wa_pro-epop TO wa_tr-month12.
ENDCASE.
AT LAST.
APPEND wa_tr TO tr_tab.
ENDAT.
ENDLOOP.Hi Ricardo.
Try this sample code and make changes to urs.
DATA: v_field(30) TYPE c.
DATA: BEGIN OF itab OCCURS 0,
period(2),
month01(3),
month02(3),
month03(3),
month04(3),
month05(3),
END OF itab.
FIELD-SYMBOLS : <fs> TYPE ANY.
FIELD-SYMBOLS : <fs1> TYPE ANY.
itab-period = '01'.
APPEND itab.
itab-period = '02'.
APPEND itab.
itab-period = '03'.
APPEND itab.
itab-period = '04'.
APPEND itab.
itab-period = '05'.
APPEND itab.
LOOP AT itab.
UNASSIGN <fs1>.
ASSIGN itab-period TO <fs1>.
CONCATENATE 'ITAB-' 'MONTH' itab-period INTO v_field.
UNASSIGN <fs>.
ASSIGN (v_field) TO <fs>.
CASE itab-period.
WHEN <fs1>.
IF <fs> IS NOT ASSIGNED.
<fs> = 0.
ELSE.
<fs> = <fs1>.
ENDIF.
ENDCASE.
ENDLOOP.
LOOP AT itab.
WRITE: itab-period, itab-month01, itab-month02, itab-month03,
itab-month04, itab-month05.
ENDLOOP.
<b>Assign Points if useful.</b> -
hi all
i got a internal table, how to dynamic append the line to the internal?
below is my code
DATA: line(256) TYPE c,
text_tab LIKE STANDARD TABLE OF line,
field LIKE line.
this is a static append.
<b>line = '444444'.
APPEND line TO text_tab.
line = '555555'.
APPEND line TO text_tab.
line = '666666'.
APPEND line TO text_tab.</b>
how to make it dynamic append to internal table
ThanksHi
Check this sample report
REPORT z_dynamic_program.
TABLES:dd02l,
vlcvehicle.
FIELD-SYMBOLS: <fs_table> TYPE STANDARD TABLE,
<fs_warea> TYPE ANY,
<fs_any> TYPE ANY.
DATA:t_anytable TYPE REF TO data,
f_warea TYPE REF TO data,
tb_condition(72) TYPE c OCCURS 0 WITH HEADER LINE.
DATA:w_dynproname TYPE sy-repid,
w_msg(70) TYPE c.
DATA:t_code(72) TYPE c OCCURS 0 WITH HEADER LINE.
PARAMETERS:pa_tnam LIKE dd02l-tabname.
SELECT-OPTIONS:so_comm FOR vlcvehicle-zz_commnos.
START-OF-SELECTION.
SELECT SINGLE * FROM dd02l WHERE tabname = pa_tnam.
IF sy-subrc NE 0.
STOP.
ENDIF.
APPEND 'Program SubPool.' TO t_code.
APPEND ' ' TO t_code.
CONCATENATE 'TYPES TY_TABLE TYPE ' pa_tnam ' OCCURS 0.'
INTO t_code SEPARATED BY space.
APPEND t_code.
CONCATENATE 'TYPES TY_WAREA TYPE ' pa_tnam '.'
INTO t_code SEPARATED BY space.
APPEND t_code.
APPEND 'Form generate_table changing p_table type ref to data '
TO t_code.
APPEND ' p_warea type ref to data.'
TO t_code.
APPEND ' create data p_table type (''TY_TABLE''). '
TO t_code.
APPEND ' create data p_warea type (''TY_WAREA''). '
TO t_code.
APPEND 'Endform. ' TO t_code.
GENERATE SUBROUTINE POOL t_code
NAME w_dynproname
MESSAGE w_msg.
IF sy-subrc NE 0.
WRITE : / w_msg.
STOP.
ENDIF.
* Call the subroutine to get reference to dyn table
PERFORM generate_table IN PROGRAM (w_dynproname)
CHANGING t_anytable
f_warea.
ASSIGN t_anytable->* TO <fs_table>.
ASSIGN f_warea->* TO <fs_warea>.
***** Fetch the data from the database based on the Commission number
* and the Table name
SELECT *
INTO TABLE <fs_table>
FROM (pa_tnam)
WHERE Z_COMMNOS IN so_comm.
IF sy-subrc NE 0.
STOP.
ENDIF.
DELETE FROM (pa_tnam) WHERE Z_COMMNOS IN so_comm.
IF sy-subrc EQ 0.
WRITE:/ sy-dbcnt.
ENDIF.
END-OF-SELECTION.
Regards
Pavan -
Hi all,
This is what I want to achieve. I have an attribute for an IO, but the values for that has to be decided at the transfer structure level. I want to write a routine in the transfer rules to populate the field.
I have another field that gets populated from R/3. I need to write a routine which would take this value and see if it falls in the range and have to decide the value and populate.
I have gl_account coming in, and in the routine I need to take that value of the gl_account and see if it falls in the range of 1 5000 or 6700 - 8130 if so assign a + sign and if not assign a sign to the new field.
Any sample code would be appreciated and rewarded.
Thanks,
SriGlobal code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
$$ begin of routine - insert your code only below this line -
DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
Data: temp1 TYPE RANGE OF TRAN_STRUCTURE-ZDEBITCREDIT,
Data: temp1_line LIKE LINE OF temp1.
temp1_line-sign = 'I'.
temp1_line-option = 'BT'.
temp1_line-low = '001'.
temp1_line-high = '5000'.
APPEND temp1_line TO temp1
Data: temp2 TYPE RANGE OF TRAN_STRUCTURE-ZDEBITCREDIT,
Data: temp2_line LIKE LINE OF temp2.
temp2_line-sign = 'I'.
temp2_line-option = 'BT'.
temp2_line-low = '5001'.
temp2_line-high = '8000'.
APPEND temp2_line TO temp2
Data: temp(1) char.
if TRAN_STRUCTURE-0glaccnt IN temp1.
temp3 = '+'.
elseif TRAN_STRUCTURE-0glaccnt IN temp2.
temp 3= '-'.
endif
RESULT = temp3 .
returncode <> 0 means skip this record
RETURNCODE = 0.
abort <> 0 means skip whole data package !!!
ABORT = 0.
$$ end of routine - insert your code only before this line - -
Need sample code with RV_INVOICE_CREATE used
Hi everybody!
I need sample code with RV_INVOICE_CREATE or similar FMs used.
The thing is that I do not know how to populate parametres of this and other invoicing FMs....
For example, there are some tables to be passed to RV_INVOICE_CREATE
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS
How to populate them? I mean how to fill them with needed values?
Useful answers will be awarded.
Kind regards, M.RV_INVOICE_CREATE is the function module to create invoice based on delivery .
when you pass delivery number ,it will create invoice ,see the invoice number in vf02,vf03 transaction. and also see the data vbrk,vbrp tables
I have done this development and i have cancelled invoice,reverse goods issue,updated the delivery and again i am createing invoice..see the below progrm to get better understanding.
REPORT ZWM_OVERWEIGHT_FIX no standard page heading
message-id zwm.
======================================================================
Program Name : ZWM_OVERWEIGHT_FIX *
Description : Tool to fix Overweight in delivery line item, *
Used All Function module to cancel invoice , *
Reverse the goods issue ,Update Delivery qty,Create *
invoice *
Author : Seshu *
Date : 05/08/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
05/08/07| Seshu | DEVK921979 | Initial *
D A T A - D E C L A R A T I O N *******************
Tables
Tables : vbak,
vbap,
vbfa,
likp,
lips,
vbrk,
vbrp.
Internal Tables
data : i_lips like lips occurs 0 with header line,
i_vbap like vbap occurs 0 with header line.
Variables
data : v_deliv like vbfa-vbelv,
v_invoic like vbfa-vbelv.
Data Declaration Part for Post Goods Issue
DATA: l_vbeln LIKE likp-vbeln,
l_vbkok LIKE vbkok,
i_prot LIKE prott OCCURS 0 WITH HEADER LINE,
ef_error_any_0 TYPE c,
ef_error_in_item_deletion_0 TYPE c,
ef_error_in_pod_update_0 TYPE c,
ef_error_in_interface_0 TYPE c,
ef_error_in_goods_issue_0 TYPE c,
ef_error_in_final_check_0 TYPE c,
d_return LIKE bapireturn1.
Internal tables for BAPI Function Module
data : i_cret like BAPIRETURN1 occurs 0 with header line,
i_csucess like BAPIVBRKSUCcESS occurs 0 with header line,
i_ret2 like bapiret2 ,
flag type c,
i_mesg like mesg occurs 0 with header line.
Data Declaration for Invoice Creation
DATA: VBSK_I LIKE VBSK.
data: d_success type c.
DATA: XKOMFK LIKE KOMFK OCCURS 0 WITH HEADER LINE,
XKOMV LIKE KOMV OCCURS 0 WITH HEADER LINE,
XTHEAD LIKE THEADVB OCCURS 0 WITH HEADER LINE,
XVBFS LIKE VBFS OCCURS 0 WITH HEADER LINE,
XVBPA LIKE VBPAVB OCCURS 0 WITH HEADER LINE,
XVBRK LIKE VBRKVB OCCURS 0 WITH HEADER LINE,
XVBRP LIKE VBRPVB OCCURS 0 WITH HEADER LINE,
XVBSS LIKE VBSS OCCURS 0 WITH HEADER LINE,
XKOMFKGN LIKE KOMFKGN OCCURS 0 WITH HEADER LINE.
S E L E C T I O N - S C R E E N ******************
Selection-screen
Selection-screen : begin of block blk with frame title text-001.
parameters : p_vbeln like vbak-vbeln obligatory.
selection-screen : end of block blk.
A T - S E L E C T I O N - S C R E E N ***************
Validation on Sales order
at selection-screen on p_vbeln.
Check the data on VBAK Table
select single vbeln from vbak into vbak-vbeln
where vbeln = p_vbeln.
if sy-subrc ne 0.
message e006 with p_vbeln.
endif.
S T A R T - O F - S E L E C T I O N *******************
Start-of-selection.
break sreddy.
Get the Invoice Number corresponding Sales Order Number
perform get_invoice.
Step 1.
Cancel the Invoice - Transaction VF11
perform cancel_invoice.
Reverse the goods issue
perform reverse_goodsissue.
Get the Order and Delivery Items
perform get_sales_deliv.
Delivery Change
perform Delivery_change.
Create Invoice document
perform invoice_create.
E N D - O F - S E L E C T I O N *******************
end-of-selection.
if flag = 'X'.
message i012 with p_vbeln.
endif.
*& Form get_invoice
Get Invoice Number
FORM get_invoice.
Clear Variables
clear : v_deliv,
v_invoic,
flag.
Get the Delivery Number First
select single vbeln from vbfa into v_deliv
where vbelv = p_vbeln
and vbtyp_n = 'J'.
if sy-subrc ne 0.
message i004 with p_vbeln.
stop.
endif.
Get the Invoice Number
select single vbeln from vbfa into v_invoic
where vbelv = p_vbeln
and vbtyp_n = 'M'.
if sy-subrc ne 0.
message i003 with p_vbeln.
stop.
endif.
ENDFORM. " get_invoice
*& Form cancel_invoice
Cancel the Invoice
FORM cancel_invoice.
clear : i_ret2,
i_cret,
i_csucess.
refresh : i_cret,
i_csucess.
CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
EXPORTING
BILLINGDOCUMENT = v_invoic
TESTRUN =
NO_COMMIT =
BILLINGDATE =
TABLES
RETURN = i_cret
SUCCESS = i_csucess
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = space
IMPORTING
RETURN = i_ret2.
read table i_cret with key type = 'E'.
if sy-subrc ne 0.
message i005 with v_invoic.
stop.
endif.
ENDFORM. " cancel_invoice
*& Form reverse_goodsissue
Reverse the goods Issue
FORM reverse_goodsissue.
Local Variable
data : lv_vbtyp like likp-vbtyp.
clear : i_mesg,
lv_vbtyp.
refresh : i_mesg.
select single vbtyp from likp into lv_vbtyp
where vbeln = v_deliv.
CALL FUNCTION 'WS_REVERSE_GOODS_ISSUE'
EXPORTING
I_VBELN = v_deliv
I_BUDAT = sy-datum
I_COUNT =
I_MBLNR =
I_TCODE =
I_VBTYP = lv_vbtyp
TABLES
T_MESG = i_mesg
EXCEPTIONS
ERROR_REVERSE_GOODS_ISSUE = 1
OTHERS = 2
if sy-subrc ne 0.
message i007 with v_deliv.
endif.
ENDFORM. " reverse_goodsissue
*& Form get_sales_deliv
Get the Sales order and Deliv Items
FORM get_sales_deliv.
Local Variables
data : lv_kwmeng like vbap-kwmeng.
clear : i_lips,
i_vbap.
refresh : i_lips,
i_vbap.
Select the data from LIPS
select * from lips into table i_lips
where vbeln = v_deliv.
if sy-subrc ne 0.
message i008 with v_deliv.
stop.
endif.
sort i_lips by vbeln posnr.
Get the Sales order Item Data.
select * from vbap into table i_vbap
where vbeln = p_vbeln.
if sy-subrc ne 0.
message i006 with p_vbeln.
stop.
endif.
sort i_vbap by vbeln posnr.
Compare delivery Item and Order Items
loop at i_lips.
clear lv_kwmeng.
read table i_vbap with key posnr = i_lips-posnr.
if sy-subrc eq 0.
lv_kwmeng = i_vbap-kwmeng * 2.
if lv_kwmeng >= i_lips-lfimg.
i_lips-lfimg = i_vbap-kwmeng.
modify i_lips.
endif.
endif.
endloop.
ENDFORM. " get_sales_deliv
*& Form Delivery_change
Delivery Update
FORM Delivery_change.
Clear : i_prot.
refresh : i_prot.
Delivery Update
CALL FUNCTION 'LE_MOB_DELIVERY_UPDATE'
EXPORTING
do_commit = 'X'
TABLES
t_delivery_items = i_lips
prot = i_prot
EXCEPTIONS
conversion_overflow = 1
essential_data_missing = 2
error = 3
nothing_to_update = 4
lock_after_update_failed = 5
error_in_delivery_update = 6
OTHERS = 7.
COMMIT WORK.
IF sy-subrc <> 0.
MESSAGE i009 with v_deliv.
endif.
Post Goods Issue
CLEAR: d_return,
i_prot,
l_vbeln,
l_vbkok.
REFRESH i_prot.
CLEAR: ef_error_in_item_deletion_0 ,
ef_error_in_pod_update_0 ,
ef_error_in_interface_0 ,
ef_error_in_goods_issue_0 ,
ef_error_in_final_check_0 .
carry out goods issue
l_vbeln = v_deliv.
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
carry out goods issue
l_vbeln = v_deliv.
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
SET UPDATE TASK LOCAL.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = l_vbkok
synchron = 'X'
no_messages_update = ' '
update_picking = 'X'
commit = 'X'
delivery = l_vbeln
nicht_sperren = 'X'
if_error_messages_send_0 = space
IMPORTING
ef_error_any_0 = ef_error_any_0
ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
ef_error_in_pod_update_0 = ef_error_in_pod_update_0
ef_error_in_interface_0 = ef_error_in_interface_0
ef_error_in_goods_issue_0 = ef_error_in_goods_issue_0
ef_error_in_final_check_0 = ef_error_in_final_check_0
TABLES
prot = i_prot
EXCEPTIONS
error_message = 1
OTHERS = 2.
if sy-subrc ne 0.
message i010 with v_deliv.
else.
COMMIT WORK .
endif.
ENDFORM. " Delivery_change
*& Form invoice_create
Invoice Creation
FORM invoice_create.
refresh: XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS.
clear : XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS,
VBSK_I.
VBSK_I-SMART = 'F'.
XKOMFK-VBELN = v_deliv.
XKOMFK-VBTYP = 'J'.
APPEND XKOMFK.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
VBSK_I = VBSK_I
WITH_POSTING = 'C'
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS.
if sy-subrc eq 0.
COMMIT WORK.
flag = 'X'.
else.
message i011 with p_vbeln.
endif.
ENDFORM. " invoice_create
Reward Points if it is helpful
Thanks
Seshu -
Sample code converting binary data to image file
Hi experts ,
I need sample code to convert binary data (bytes) in to an image file.
any help will be appreciated.
Thanks and Regards,
NareshYou need to show binary and decimal? Or now just decimal?
If binary and decimal, you can right click on your indicator and choose "Display Format...". If you select the Advanced Editing Mode, you can make soft interesting display formats. This includes showing the same value in mulitple ways in the indicator. Try something like "%032b - %d" for the format string.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Sample code to send a mail from SAP
Hi guys
could any one provide me with the
sample code to send a mail from SAP with text as the main body of that mail via bcs classesHi,
Please go through this code: U can send mail;
Tables : zchp_cust-info.
DATA: OBJCONT LIKE SOLISTI1 OCCURS 5 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: ENTRIES LIKE SY-TABIX.
DATA: NAME(15).
DATA: CON_NAME(20).
DATA: req_num like zchp_cust_info.
DATA: I_TAB_CHP LIKE ZCHP_CUST_INFO OCCURS 0 WITH HEADER LINE.
*data: reno like ZCHP_CUST_INFO-req_num value .
data input for the mail
select * from zchp_cust_info
appending table i_tab_chp where req_num = c_knumv.
LOOP AT I_TAB_CHP.
concatenate i_tab_chp-created_by i_tab_chp-req_num into CON_NAME.
*WRITE: / con_name.
ENDLOOP.
Fill the document
DOC_CHNG-OBJ_NAME = 'Refe'.
DOC_CHNG-OBJ_DESCR = 'TESCRA Ref Number !'.
DOC_CHNG-SENSITIVTY = 'P'.
*OBJCONT = 'Tescra'.
OBJCONT = CON_NAME.
APPEND OBJCONT.
OBJCONT = con_name.
APPEND OBJCONT.
DESCRIBE TABLE OBJCONT LINES ENTRIES.
READ TABLE OBJCONT INDEX ENTRIES.
DOC_CHNG-DOC_SIZE = ( ENTRIES - 1 ) * 255 + STRLEN( OBJCONT ).
Fill the receiver list
CLEAR RECLIST.
RECLIST-RECEIVER = SY-UNAME. " replace with <login name>
RECLIST-REC_TYPE = 'B'.
RECLIST-EXPRESS = 'X'.
APPEND RECLIST.
CLEAR RECLIST.
RECLIST-RECEIVER = 'sapuser'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
Send the document
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_TYPE = 'RAW'
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
LOOP AT RECLIST.
IF RECLIST-RECEIVER = SPACE.
NAME = RECLIST-REC_ID.
ELSE.
NAME = RECLIST-RECEIVER.
ENDIF.
IF RECLIST-RETRN_CODE = 0.
WRITE: / NAME, ': succesfully sent'.
ELSE.
WRITE: / NAME, ': error occured'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'Too many receivers specified !'.
WHEN 2.
WRITE: / 'No receiver got the document !'.
WHEN 4.
WRITE: / 'Missing send authority !'.
WHEN OTHERS.
WRITE: / 'Unexpected error occurred !'.
ENDCASE.
<b>Please provide points if the issue is solved.</b>
Regards,
Sunil -
C++ code to get XMP metadata from pdf files ??
Hi,
I am new to this field and now I have to write a C++ code which will read the XMP metadata from any pdf files. Could anyone please tell me how to do that or where to start? Is there any sample code available for that?
I am reading the Programmer's guide and XMP specification to have the whole idea.
I really appriciate your help. Thanks in advance.
Regards,
Suranjit PaulHi,
The same code for reading other formats will go for Pdf too.
Only difference is while reading PDF it is not calling any smart filters. -
Sample code to call web dympro from event
Hi.
I have a web dympro form. I want to call this form with dynamic url to which I want to pass parameter transaction_id. For example url http://www.zzz.com&transaction_id=7712
I created new button and event in component from which i want to make a call. Now i want to know if someone has a sample code which would from event call this dynamic url.
Thanks in advance.hi,
see below thread , may be it helps.
Re: Start dynamic URL from CRM Opportunity -
Regarding bapi to issue PGI BAPI_OUTB_DELIVERY_CHANGE,sample code please
Can you send me the sample code of this bapiBAPI_OUTB_DELIVERY_CHANGE ,if any one have used this.it's urgent please..
Hi,
BAPI_OUTB_DELIVERY_CHANGE - BAPI for Change to Outbound Delivery
BAPI_INB_DELIVERY_SAVEREPLICA - Create Inbound Delivery
RV_DELIVERY_CREATE - Create Delivery
GN_DELIVERY_CREATE - Create an Outbound Delivery
Код:
FORM xkomdlgn_fill USING p_open_qty LIKE ekpo-menge
p_eindt LIKE eket-eindt
p_licha LIKE eket-licha
p_charg LIKE eket-charg
p_uzeit LIKE eket-uzeit.
STATICS: h_grkor LIKE lips-grkor,
h_bsmng LIKE ekpo-menge.
CLEAR t_xkomdlgn.
CHECK t_ekpo-uptyp NE '5' " Lot
AND t_ekpo-uptyp NE '6' " Display
AND t_ekpo-uptyp NE '7' " VK-Set
AND t_ekpo-uptyp NE 'H'. " GT-Stuckliste
IF t_ekpo-uebpo IS INITIAL AND t_ekpo-upvor CA '1I'.
CHECK 1 = 2.
ENDIF.
IF NOT ekko-lifnr IS INITIAL.
CALL FUNCTION 'VENDOR_MASTER_DATA_SELECT_12'
EXPORTING
pi_lifnr = ekko-lifnr
pi_ekorg = ekko-ekorg
IMPORTING
pe_lfm1 = lfm1
EXCEPTIONS
no_entry_found = 1
OTHERS = 2.
t_xkomdlgn-vsbed = lfm1-vsbed.
ELSE.
CLEAR t_xkomdlgn-vsbed.
ENDIF.
t_xkomdlgn-adrnr_li = ekko-adrnr.
t_xkomdlgn-lifnr = ekko-lifnr.
t_xkomdlgn-inco1 = ekko-inco1.
t_xkomdlgn-inco2 = ekko-inco2.
t_xkomdlgn-exnum = ekko-exnum.
t_xkomdlgn-bukrs_best = ekko-bukrs.
t_xkomdlgn-matnr = t_ekpo-matnr.
t_xkomdlgn-werks = t_ekpo-werks.
*IF STORAGE LOCATION IS MISSING APPEND
*FG01 As storage location
IF t_ekpo-lgort IS INITIAL .
t_xkomdlgn-lgort = 'FG01' .
ELSE .
t_xkomdlgn-lgort = t_ekpo-lgort.
ENDIF.
xkomdlgn-charg = ?
T_XKOMDLGN-VRKME = T_EKPO-MEINS.
t_xkomdlgn-meins = t_ekpo-lmein.
t_xkomdlgn-umvkz = t_ekpo-umrez.
t_xkomdlgn-umvkn = t_ekpo-umren.
IF t_ekpo-matnr EQ space.
t_xkomdlgn-meins = t_ekpo-meins.
t_xkomdlgn-umvkz = 1.
t_xkomdlgn-umvkn = 1.
ENDIF.
t_xkomdlgn-insmk = t_ekpo-insmk.
t_xkomdlgn-kzfme = t_ekpo-kzfme.
t_xkomdlgn-kzvbr = t_ekpo-kzvbr.
t_xkomdlgn-lfimg = p_open_qty.
t_xkomdlgn-lfdat = p_eindt.
t_xkomdlgn-lfuhr = p_uzeit.
xkomdlgn-vstel = ?
XKOMDLGN-VKORG = ?
xkomdlgn-vtweg = ?
XKOMDLGN-SPART = ?
t_xkomdlgn-traid = t_ekpo-traid."CARRIER CODE
t_xkomdlgn-lifex = t_ekpo-lifex."External ID
t_xkomdlgn-bolnr = t_ekpo-bolnr."Bill Of Lading
t_xkomdlgn-xabln = t_ekpo-xabln."Goods Receipt/Issue Slip Number
t_xkomdlgn-vgbel = t_ekpo-ebeln.
t_xkomdlgn-vgpos = t_ekpo-ebelp.
t_xkomdlgn-lfart = gf_dlv_type.
t_xkomdlgn-vgtyp = 'V'.
t_xkomdlgn-kzazu = 'X'.
t_xkomdlgn-knttp = t_ekpo-knttp.
t_xkomdlgn-sobkz = t_ekpo-sobkz.
SELECT * FROM t163g WHERE bstae EQ t_ekpo-bstae
AND ebtyp EQ gf_ebtyp.
EXIT.
ENDSELECT.
IF sy-subrc = 0.
prufen, ob lieferavis we-zuordnung hat (vorauss. fur we uber vl32)
und wepos prufen
if t163g-wezuo eq space or t_ekpo-wepos eq space.
t_xkomdlgn-nowab = 'X'.
ELSE.
CLEAR t_xkomdlgn-nowab.
ENDIF.
ENDIF.
IF t_ekpo-matnr IS INITIAL OR t_ekpo-pstyp = '6'.
t_xkomdlgn-posar = 'B'.
ENDIF.
t_xkomdlgn-ematn = t_ekpo-ematn.
t_xkomdlgn-mfrnr = t_ekpo-mfrnr.
t_xkomdlgn-mfrpn = t_ekpo-mfrpn.
t_xkomdlgn-emnfr = t_ekpo-emnfr.
t_xkomdlgn-cuobj = t_ekpo-cuobj.
t_xkomdlgn-uebto = t_ekpo-uebto.
t_xkomdlgn-untto = t_ekpo-untto.
t_xkomdlgn-uebtk = t_ekpo-uebtk.
t_xkomdlgn-lichn = p_licha.
t_xkomdlgn-charg = p_charg.
t_xkomdlgn-bwtar = t_ekpo-bwtar.
t_xkomdlgn-kdmat = t_ekpo-idnlf.
t_xkomdlgn-arktx = t_ekpo-txz01.
t_xkomdlgn-mfrgr = t_ekpo-mfrgr.
t_xkomdlgn-gewei = t_ekpo-gewei.
t_xkomdlgn-voleh = t_ekpo-voleh.
t_xkomdlgn-ntgew = t_ekpo-ntgew * t_xkomdlgn-lfimg.
t_xkomdlgn-brgew = t_ekpo-brgew * t_xkomdlgn-lfimg.
t_xkomdlgn-volum = t_ekpo-volum * t_xkomdlgn-lfimg.
t_xkomdlgn-ean11 = t_ekpo-ean11.
t_xkomdlgn-podrel = t163l-podrel.
t_xkomdlgn-aktnr = t_ekpo-aktnr.
t_xkomdlgn-abeln = t_ekpo-abeln.
t_xkomdlgn-abelp = t_ekpo-abelp.
xkomdlgn-ltssf = only SORT criteria IN vl31n
T_XKOMDLGN-AUREL = T_EKPO-AUREL.
t_xkomdlgn-idnlf = t_ekpo-idnlf.
t_xkomdlgn-matkl = t_ekpo-matkl.
leergut-stuckliste ubernehmen
clear t_xkomdlgn-grkor.
CLEAR t_xkomdlgn-kmpmg.
CLEAR t_xkomdlgn-uepos.
CLEAR t_xkomdlgn-uepvw. "549736
IF t_ekpo-upvor CA '3X'.
h_grkor = h_grkor + 1.
t_xkomdlgn-grkor = h_grkor.
h_bsmng = t_ekpo-menge.
ENDIF.
IF NOT t_ekpo-uebpo IS INITIAL AND
t_ekpo-uptyp CA '3X'.
t_xkomdlgn-uepvw = 'G'. "549736
t_xkomdlgn-uepos = t_ekpo-uebpo.
t_xkomdlgn-grkor = h_grkor.
IF h_bsmng NE 0.
t_xkomdlgn-kmpmg = t_ekpo-menge / h_bsmng.
ENDIF.
ENDIF.
IF t_ekpo-pstyp EQ '2'.
t_xkomdlgn-sobkz = 'K'.
ENDIF.
kontierungsfelder
if t_ekpo-sobkz eq 'E' or t_ekpo-sobkz eq 'Q'.
CALL FUNCTION 'MMPUR_EKKN_READ_EBELN_EBELP'
EXPORTING
pi_ebeln = t_ekpo-ebeln
pi_ebelp = t_ekpo-ebelp
pi_bypassing_buffer = pi_refresh_buffer
=
tables
pto_ekkn_po = xekkn
EXCEPTIONS
no_records_requested = 1
OTHERS = 2.
IF sy-subrc EQ 0.
READ TABLE xekkn INDEX 1.
t_xkomdlgn-ps_psp_pnr = xekkn-ps_psp_pnr.
t_xkomdlgn-vbelv = xekkn-vbeln.
t_xkomdlgn-posnv = xekkn-vbelp.
ENDIF.
ENDIF.
APPEND t_xkomdlgn.
ENDFORM. "xkomdlgn_fill
LOOP AT t_xkomdlgn.
set default parameter
t_xkomdlgn-vgtyp = 'V'.
t_xkomdlgn-kzazu = 'X'.
IF t_xkomdlgn-lfart IS INITIAL.
t_xkomdlgn-lfart = 'EL'.
ENDIF.
MODIFY t_xkomdlgn.
ENDLOOP.
SELECT SINGLE * FROM tvsa WHERE smart = xvbsk-smart.
IF sy-subrc 0.
Error Handling To be Done
Meldung ins Protokoll
ENDIF.
l_nrnr = tvsa-numki.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = l_nrnr
object = 'RV_SAMMG'
IMPORTING
number = xvbsk-sammg
EXCEPTIONS
OTHERS = 1.
IF sy-subrc 0.
error hadling tbd
meldung ins protokoll
endif.
CALL FUNCTION 'GN_DELIVERY_CREATE'
EXPORTING
no_commit = 'X'
vbsk_i = xvbsk
if_no_deque = 'X'
IF_MASS_READ_MAT_SW = 'X'
vbls_pos_rueck = 'X'
TABLES
xkomdlgn = t_xkomdlgn
xvbfs = xvbfs
xvbls = xvbls
xxlips = xlips.
get informatioin from ekpo table and fill T_xkomdlgn -
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 -
Need case studies and sample code for all concept of ABAP
Hello,
Can anybody provide me the case studies and sample code for learning different concepts in ABAP programming like: module pool, ALV, interactive reports, BDC, Smart Form etc.? As I want to do some practical application by which i can learn more.
Thanks & Regards,
Vikram RawalIn this link You can find Step by Step Scren Shot document :
http://www.201interviewquestions.com/docs/User%20exits.ppt
http://erpgenie.com/abaptips/component/option,com_docman/task,doc_details/gid,27/
<b>
Reprots</b>
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
<b>Dictionary</b>
http://sapabap.iespana.es/sapabap/manuales/learnabap/
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb6e446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea31446011d189700000e8322d00/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBDIC/BCDWBDIC.pdf
<b>ABAP objects</b>
Please check this online document (starting page 1291).
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Also check this links as well.
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.futureobjects.de/content/intro_oo_e.html
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
<b>
SAPScripts</b>
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
Check these step-by-step links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
<b>Smartforms material</b>
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
<b>
BAPI</b>
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
<b>List of all BAPIs</b>
http://www.planetsap.com/LIST_ALL_BAPIs.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
<b>ALV programs.</b>
http://www.geocities.com/mpioud/Abap_programs.html
. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
<b>ALV</b>
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
<b>Top-of-page in ALV</b>
selection-screen and top-of-page in ALV
<b>ALV Group Heading</b>
http://www.sap-img.com/fu037.htm
<b>ALV</b>
http://www.geocities.com/mpioud/Abap_programs.html
<b>
RFC Destination</b>
Re: SM59
<b>
ALE/ IDOC</b>http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
<b>Table Control</b>
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table%20control%20in%20abap.pdf
<b>
ABAP transactions</b>
http://www.easymarketplace.de/transactions-a-e.php?Area=4soi&name=volker&pw=vg&
Regards,
Priyanka. -
Sample code to find duplicated entries in internal table and mark them?
We have one internal table called itab1 which contains the following fields:
f1 (key field)
f2 (non-key field)
f3 (non-key field)
The business scenario is f1, f2, and f3 are one to one relationship to each other, or in other word, f2 or f3 can't be duplicated with the the same values for different f1 (key field) records. We will move the check result of the duplication into another internal table itab2 which contains f1, f2, f3, f4, and f5 where f1, f2, and f3 are the same ones as in itab1, f4 will get the value "Yes" to mark duplicated for f2 (or "No" to mark non-duplicated), and f5 will get the value "Yes" to mark duplicated for f3 (or "No" to mark non-duplicated).
We know that through the loop of itab1, the above logic can be done to fill in f4 and f5 value for each row with either "Yes" or "No".
Just give an example of how itab2 will look like after the coding:
f1----f2--f3--f4(f2 duplicated?)---f5(f3 duplicated?)
A----01-X0YesNo--
B----01-X1YesYes--
C----02-X1NoYes--
Could any ABAP expert here show us the sample code to generate itab2 in loop of itab1 to find the duplicated entries of f2 and f3 and then populated the corresponding row values for f4 and f5 with "Yes" or "No"? We will give you reward points!TYPES: BEGIN OF ty_1,
f1,
f2(2),
f3(2),
f4,
f5,
END OF ty_1.
TYPES: BEGIN OF ty_2,
type(2),
value(2),
END OF ty_2.
DATA: itab1 TYPE STANDARD TABLE OF ty_1 WITH HEADER LINE,
itab2 TYPE TABLE OF ty_2 WITH HEADER LINE.
DATA: f2_c TYPE sy-tabix VALUE 0,
f3_c TYPE sy-tabix VALUE 0,
curr_f2 LIKE itab1-f2,
curr_f3 LIKE itab1-f3.
itab1-f1 = 'A'.
itab1-f2 = '01'.
itab1-f3 = 'X0'.
APPEND itab1.
itab1-f1 = 'B'.
itab1-f2 = '01'.
itab1-f3 = 'X1'.
APPEND itab1.
itab1-f1 = 'C'.
itab1-f2 = '02'.
itab1-f3 = 'X1'.
APPEND itab1.
SORT itab1 BY f1 f2 f3 AS TEXT.
LOOP AT itab1.
IF sy-tabix EQ 1.
curr_f2 = itab1-f2.
curr_f3 = itab1-f3.
ENDIF.
IF itab1-f2 NE curr_f2.
f2_c = 0.
curr_f2 = itab1-f2.
ENDIF.
IF itab1-f3 NE curr_f3.
f3_c = 0.
curr_f3 = itab1-f3.
ENDIF.
f2_c = f2_c + 1.
f3_c = f3_c + 1.
IF f2_c > 1.
itab1-f4 = 'X'.
MODIFY itab1.
itab2-type = 'f2'.
itab2-value = itab1-f2.
APPEND itab2.
ENDIF.
IF f3_c > 1.
itab1-f5 = 'X'.
MODIFY itab1.
itab2-type = 'f3'.
itab2-value = itab1-f3.
APPEND itab2.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM itab2.
LOOP AT itab2.
IF itab2-type = 'f2'.
LOOP AT itab1 WHERE f2 = itab2-value AND f4 NE 'X'.
itab1-f4 = 'X'.
MODIFY itab1.
ENDLOOP.
ELSE.
LOOP AT itab1 WHERE f3 = itab2-value AND f5 NE 'X'.
itab1-f5 = 'X'.
MODIFY itab1.
ENDLOOP.
ENDIF.
ENDLOOP.
Edited by: Ramiro Escamilla on Apr 5, 2008 1:45 AM
changed the code, now should work
Maybe you are looking for
-
Creation of Service Master Record (Furniture and Fixture Maintenance)
Hi, I want to create a Service Master for "Furniture and Fixture Maintenance". What should I keep in mind while creating a Service Master Record. Would like to know the about the following fields which seems to be useful: Activity Number: Base Unit o
-
I have an external hard drive that I have used as Time Machine backup, but not for a while. Now when I plug it in, computer says this disc is not readable. I want to keep the backups on it and not erase and start over. Thank you in advance. Gregor
-
Photoshop CC stops working after using Load Files into Photoshop Layers in Bridge CC
Okay, so basically I selected some 40 images in .bmp to load into Photoshop, but it stops working and closes. I don't have any other versions installed and I already tried installing it again, with no avail. Is there anything I can do to fix this? Sh
-
Best approach to creating a TOC for product catalog using data merge
What is the best approach for creating a TOC for a product catalog (over 1,000 items) using Data Merge? The TOC would contain the product Categories. So for example, Category A items could go from pages 1 - 3, and Category B items would start at pg
-
I created a table at design time and binded data from model. I want to change tables first row to red color. I tried to change at design time but all rows colour are being changed. Can any one tell me how to do it?