Creating PDF using BAPI
Hi,
I am trying to create PDF using BAPI. I got one BAPI(Z_MM_EPSP_BAPI_GET_PO_PDF). That bapi returns bytecodes. How can I generate PDF file using this BAPI output in BLS. Give some example
Thanks & Regards
Art
Art,
Are you familiar with xMII at all? I would like to answer your question but it seems more like a tutoring lesson rather than a technical problem.
Please post a problem and not how somone can help you do your work. Unless of course you are willing to paypal some money over. :-D
Similar Messages
-
How to create invoice using bapi base on delivery number with example
hi,
Pl give me one example to create invoice using bapi base on delivery number (PGI).Use this code
* Pass the delivery no to the FM to create the invoice
wa_vbsk-smart = u2018Fu2019.
wa_komfk-vbeln = nast-objky. u201CuF0DF-----delivery number
APPEND wa_komfk TO it_komfk.
CLEAR wa_komfk.
* To fill the message structure
* l_wa_error-vbeln_vl = nast-objky. " Delivery No.
* l_wa_error-fkart = wa_ztab-bil_doc_type." Billing Doc type
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
* delivery_date = 0
invoice_date = v_date u201C<- date
* invoice_type = ' '
* pricing_date = 0
vbsk_i = wa_vbsk
with_posting = u2018Du2019
* select_date = 0
i_no_vblog = ' '
i_analyze_mode = ' '
id_utasy = ' '
id_utswl = ' '
id_utsnl = ' '
id_no_enqueue = ' '
id_new_cancellation = ' '
** IMPORTING
* VBSK_E =
* OD_BAD_DATA =
* DET_REBATE =
TABLES
xkomfk = it_komfk
xkomv = it_komv
xthead = it_thead
xvbfs = it_vbfs
xvbpa = it_vbpa
xvbrk = it_xvbrk
xvbrp = it_vbrp
xvbss = it_vbss
* XKOMFKGN =
* XKOMFKKO = -
Need code for sales order create report using bapi's
need code for sales order create report using bapi's
Hi,
Go through below link
http://www.saptechies.com/bapi_salesorder_createfromdat2/
<b>Reward points if it helps,</b>
Satish -
I am unable to create pdf using adobe printer to a redirected folder on a server running windows server 2003
In the app-server-ant.xml file, as indiacted in the error message i am getting, at line 145 it is suppose to get the path to \bin\asadmin.bat from the value of a paramater called 'asadmin'. This value is being set in the beginning of the file.
The parameter value of 'asadmin' is further referring to value of another parameter called 'javaee.home' which is being set in tut-install/javaeetutorial5/examples/bp-project/build.properties
I have checked the values of both these parameters and they are set correctly, so since it is still giving me problems, at line 145 i hard coded the path instead of the parameter name:
I replaced line
<exec executable="${asadmin}" failonerror="${failonerror}" dir="${javaee.home}">
with
<exec executable="c:/sun/appserver/bin/asadmin.bat" failonerror="${failonerror}" dir="${javaee.home}">
This works. -
Scrollbar appearing while creating pdf using AlivePDF
Hi,
I am facing a problem while creating pdf using AlivePDF.
I have a VBox on which I am adding multiple pages. If the content overflows it shows scrollbar. All this is working fine.
[PHP]
<mx:VBox x="0" y="80" width="705" height="560" id="content"></mx:VBox>
[/PHP]
When I create the pdf using the following code it shows scrollbar in generated pdf (attached screenshot) while I want all the content without scrollbar
[PHP]
var pg:DisplayObject;
pg = content.getChildAt(i);
var pdf:PDF;
pdf = new PDF (Orientation.PORTRAIT, Unit.POINT, Size.LETTER);
pdf.setDisplayMode(Display.FULL_WIDTH);
pdf.addPage();
pdf.addImage(pg, new Resize(Mode.FIT_TO_PAGE, Position.CENTERED ),0, 0, 0, 0, 0, 1,true,'PNG',100);
[/PHP]
Please suggest what changes should I make to fix this.If the report didn't change, then perhaps the data did. Check
to make sure the data being supplied to the report is as expected.
I have run into mysterious errors where an expected value was of
the wrong type or a required value was now blank. It is also
possible to have existing logical errors in an iif() or other
dynamic evaluation expression that was not previously examined;
until now. So, is there any unexpected or exceptional data the
report cannot handle? -
ERROR IN CREATING PO USING BAPI
Hi friends,
My requirement is to create po using BAPI but i am getting error message .i have entered all the fields but still i am getting This errors.
E BAPI 001 No instance of object type Purchase Order has been created. External reference:
E MEPO 000 Purchase order still contains faulty items
E ME 645 Subcontracting as stock transfer within a company code not possible
I ME 123 Supplying and receiving plants identical (Please check)
please help.
thanks in advance.
Moderator message: please read message long texts, speak to a functional expert (these are not ABAP related errors), do more research before asking, do not use all capitals in the title.
Edited by: Thomas Zloch on Nov 30, 2011 1:06 PMHi
It seems you're creating a transfer order and an item is set for subcontracting, that's not possible, so check the item type
Max -
Create material using bapi ' bapi_material_savedata'
Hi Experts,
i was tring to create material using bapi ' bapi_material_savedata' but the material is not updating in the table.
please find the code and suggest me if any modification
data: la_headdata type BAPIMATHEAD,
la_clientdata type BAPI_MARA,
la_CLIENTDATAX type BAPI_MARAX,
la_return type BAPIRET2.
data: i_materialdescription type table of BAPI_MAKT,
wa_materialdescription like line of i_materialdescription.
*la_headdata-MATERIAL = int_matnum-MATERIAL.
*LOOP AT int_matnum.
la_headdata-MATERIAL = int_matnum-MATERIAL.
write : int_matnum-material.
*ENDLOOP.
la_headdata-MATERIAL = '100000518'."int_matnum-MATERIAL.
la_headdata-IND_SECTOR = p_indsr.
la_headdata-MATL_TYPE = p_matype.
la_clientdata-BASE_UOM = 'FT3'.
la_clientdata-pur_valkey = ' '.
la_CLIENTDATAX-BASE_UOM = 'X'.
la_clientdata-MATL_GROUP = '01'.
la_CLIENTDATAX-MATL_GROUP = 'X'.
wa_materialdescription = 'TEST'.
append wa_materialdescription to i_materialdescription.
clear: wa_materialdescription.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = la_headdata
CLIENTDATA = la_clientdata
CLIENTDATAX = la_CLIENTDATAX
PLANTDATA =
PLANTDATAX =
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA =
VALUATIONDATAX =
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
IMPORTING
RETURN = la_return
TABLES
MATERIALDESCRIPTION = i_materialdescription
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
Please Help me
Regards,
NareshHi all,
Now it is asking me for the other fields,
E ,
The field MARA-XCHPF/BAPI_MARA-BATCH_MGMT is defined as a required field; it does not contain an entry
i have passed this val as
la_clientdata-batch_mgmt = 'X'.
even though i am getting the same error.
can you help me to solve the issue.
Tthanks
Naresh
Edited by: naresh.k.dasari on Jan 4, 2011 10:36 AM -
Account assignment while creating reservation using bapi
Hi , I am creating reservation using BAPI (BAPI_RESERVATION_CREATE1), but when I seeing the open reservation account assignment field is blank, could any on ehelp me on this, i.e what parameter I am missing in BAPI for account assignment.
best regards
pankajHi,
there is not field to assign the account assignment in Bapi..
you need to assignt he account manaually.
Assign account assignment category.
SELECT * FROM eban INTO TABLE lt_eban WHERE banfn = w_banfn .
IF sy-subrc = 0.
LOOP AT lt_eban .
lt_eban-knttp = 'J'. "assign your own account categeory
MODIFY eban FROM lt_eban.
COMMIT WORK AND WAIT.
ENDLOOP.
endif.
Regards,
Prabhudas -
Problem while creating assets using BAPI
Use table enhancement BAPI_TE_ANLU
Diagnosis :The BAPIs for creating and changing assets currently support only those customer enhancements that relate to the user fields created using SAP enhancement AIST0002.
Can anybody give the appropriate solution why this error is coming while creating assets using BAPI.Looks like you are trying to transfer custom fields into the asset master data that were not added following the steps in enhancement AIST0002.
Using EXTENSIONIN parameter, you can transfer user fields from the asset master record. However, it is not possible to transfer fields that are updated in user-defined tables. Only user fields that were defined using SAP enhancement AIST0002 and are automatically updated in table ANLU can be udpated in this way. This means you have to use table extension BAPI_TE_ANLU.
Enhancement AIST0002 contains function module EXIT_SAPL1022_001 as a component in which user fields can be implemented.
The documentation ( BAPIPAREX) of the structure that forms the basis for this parameter contains additional information about using this parameter.
Please check how table ANLU has been enhanced and also go through the documentation of enhancement AIST0002.
Regards,
Shyam -
Error while creating PDF using asynchronous
Hi,
I was using Asynchronous call to generate PDF. It was
working for some time. Now it is showing error.
We are not able to able to create PDF reports at that time.
When we are checking the exception log of the CF Server, we can
find the following error.
"Error","Thread-16","12/05/07","10:58:51",,"Error invoking
CFC for gateway CreatePDF: An exception occurred when performing
document processing. The cause of this exception was that:
java.lang.IllegalArgumentException."
coldfusion.tagext.lang.DocumentTagException: An exception
occurred when performing document processing.
at
coldfusion.tagext.lang.DocumentTag.doAfterBody(DocumentTag.java:1209)
at
cfGeneratePDF2ecfc1106407227$funcONINCOMINGMESSAGE.runFunction(C:\Inetpub\wwwroot\mycfsit e\reports\CF\model\GeneratePDF.cfc:343)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
at
coldfusion.filter.EventComponentFilter.invoke(EventComponentFilter.java:67)
at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at
coldfusion.filter.EventRequestMonitorFilter.invoke(EventRequestMonitorFilter.java:46)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at
coldfusion.eventgateway.EventProxy.invokeComponent(EventProxy.java:52)
at
coldfusion.eventgateway.EventRequestHandler.invokeCFC(EventRequestHandler.java:165)
at
coldfusion.eventgateway.EventRequestHandler.processRequest(EventRequestHandler.java:102)
at
coldfusion.eventgateway.EventRequestDispatcher$Task.run(EventRequestDispatcher.java:121)
at
coldfusion.util.SimpleWorkerThread.run(SimpleThreadPool.java:214)
Anyone having idea about this error?
Please help to track this.
Thanks in advanceIf the report didn't change, then perhaps the data did. Check
to make sure the data being supplied to the report is as expected.
I have run into mysterious errors where an expected value was of
the wrong type or a required value was now blank. It is also
possible to have existing logical errors in an iif() or other
dynamic evaluation expression that was not previously examined;
until now. So, is there any unexpected or exceptional data the
report cannot handle? -
Error while creating BOM using BAPI 'BAPI_BOM_UPLOAD_SAVE'
Hi All,
We are getting an error as 'Data is incomplete' while trying to create BoM using the bapi 'BAPI_BOM_UPLOAD_SAVE', if the item contains Item category as 'T'. But for other item category like 'L' or 'N', the bapi is sucessfull.
The values that we pass to fill the item category 'T' are operation, item_cat, bom_itm_no, COMPON_QTY, FIXED_QTY as 'X', UNMEAS as 'ST', ITEM_TEXT1 and ITEM_TEXT2.
Anyone who has faced same problem or has a solution to the problem, kindly provide a solution.
Regards,
VijayThe error you receive is because of different config for different Item Categories. Find out from the functional team what fields have they kept mandatory for the item category 'T'. You may not be passing one of those fields in the BAPI.
Try creating a BOM manually for item category 'T' and you may figure our which field you are missing. -
Error while creating Contracts using BAPI
Hello,
I am trying to use BAPI BUS2014 to create new Purchasing Contracts. Now everything works fine, except for some strange cases where Contracts are failing out with a message as:
Reference document or master record has different language
I don't understand it why. Language being set in Contracts is defined for those items in MM and it works for others but not for all. I think I am missing some basic point here. Can anyone please suggest?
Any help is highly appreciated!
Cheers
EssKayOK - stupid question. I did figure it out myself. Sorry for my impatience. This is my first BAPI program, so a bit too shaky
Cheers
EssKay -
Hi Folks,
I want to create a PO using BAPI. Which BAPI we are suppose to use and what are the mandatory fields for the same?
Sample code will be helpful.
Thanks
SiddarthHi,
*& Report ZBAPI_CREATE_PO *
*& Program demonstrates the BAPI call to create Purchase Order *
*& Minimum required parameters are used are as per the current *
*& system configuration *
REPORT ZBAPI_CREATE_PO .
*DATA DECLARATION
CONSTANTS : C_X VALUE 'X'.
*Structures to hold PO header data
DATA : HEADER LIKE BAPIMEPOHEADER ,
HEADERX LIKE BAPIMEPOHEADERX .
*Internal Tables to hold PO ITEM DATA
DATA : ITEM LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,
ITEMX LIKE BAPIMEPOITEMX OCCURS 0 WITH HEADER LINE,
*Internal table to hold messages from BAPI call
RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
data : w_header(40) value 'PO Header'.
data : ws_langu like sy-langu.
*text-001 = 'PO Header' - define as text element
selection-screen begin of block b1 with frame title text-001.
parameters : company like header-comp_code default '2700' ,
doctyp like HEADER-DOC_TYPE default 'NB' ,
cdate like HEADER-CREAT_DATE default sy-datum ,
vendor like HEADER-VENDOR default '0010000023',
pur_org like HEADER-PURCH_ORG default '2700' ,
pur_grp like HEADER-PUR_GROUP default '001' .
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
parameters : item_num like ITEM-PO_ITEM default '00001',
material like ITEM-MATERIAL default 'CRANE' ,
plant like ITEM-PLANT default '2700' ,
quantity like ITEM-QUANTITY default 100.
selection-screen end of block b2.
START-OF-SELECTION.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
HEADER-COMP_CODE = company .
HEADER-DOC_TYPE = doctyp .
HEADER-CREAT_DATE = cdate .
HEADER-VENDOR = vendor .
HEADER-LANGU = ws_langu .
HEADER-PURCH_ORG = pur_org .
HEADER-PUR_GROUP = pur_grp .
*POPULATE HEADER FLAG.
HEADERX-comp_code = c_x.
HEADERX-doc_type = c_x.
HEADERX-creat_date = c_x.
HEADERX-vendor = c_x.
HEADERX-langu = c_x.
HEADERX-purch_org = c_x.
HEADERX-pur_group = c_x.
HEADERX-doc_date = c_x.
*POPULATE ITEM DATA.
ITEM-PO_ITEM = item_num.
ITEM-MATERIAL = material.
ITEM-PLANT = plant.
ITEM-QUANTITY = quantity.
APPEND ITEM.
*POPULATE ITEM FLAG TABLE
ITEMX-PO_ITEM = item_num.
ITEMX-MATERIAL = C_X.
ITEMX-PLANT = C_X .
ITEMX-STGE_LOC = C_X .
ITEMX-QUANTITY = C_X .
ITEMX-TAX_CODE = C_X .
ITEMX-ITEM_CAT = C_X .
ITEMX-ACCTASSCAT = C_X .
APPEND ITEMX.
*BAPI CALL
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = HEADER
POHEADERX = HEADERX
POADDRVENDOR =
TESTRUN =
IMPORTING
EXPPURCHASEORDER =
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = RETURN
POITEM = ITEM
POITEMX = ITEMX.
*Confirm the document creation by calling database COMMIT
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN =
end-of-selection.
*Output the messages returned from BAPI call
LOOP AT RETURN.
WRITE / RETURN-MESSAGE.
ENDLOOP.
Create a purchase order with configuration using the BAPI
This took some time to figure out how to setup. It may be useful.
call function 'BAPI_CFG_CREATE'
exporting
object_id = 'MYMATCODE'
root_type = 'MARA'
root_name = 'MYMATCODE'
plant = 'MYPLANT'
importing
cfg_handle = l_handle
root_instance = l_instance
exceptions
error = 1
others = 2.
l_characts_vals-atnam = 'WIDTH'.
l_characts_vals-atwtb = '500'.
append l_characts_vals to it_characts_vals.
call function 'BAPI_CFGINST_CHARCS_VALS_SET'
exporting
object_id = 'MYMATCODE'
instance = l_instance
tables
characts_vals = it_characts_vals
characts_vals_err = it_characts_vals_err.
call function 'CE_C_SET_CBASE'.
l_poitem-int_obj_no = l_handle.
call function 'BAPI_PO_CREATE1'
exporting
poheader = l_poheader
poheaderx = l_poheaderx
importing
expheader = l_expheader
exppurchaseorder = l_exppurchaseorder
tables
poitem = lt_poitem
poitemx = lt_poitemx
poschedule = lt_poschedule
poschedulex = lt_poschedulex
return = lt_return.
call function 'BAPI_TRANSACTION_COMMIT'.
Regards
Sudheer -
Adobe Acrobat as a server to create PDF using PDF templates and field values
I'm writing a web page to create a PDF using fields that we ask for them in the screen.
My idea is:
1. Ask for field values (text values and a photo) in my web
2. Run Adobe Acrobat to load a PDF template (PDF form) and mix with the field values
3. Create a final PDF mixing values and template
4. Show to document to the user in his client web browser. I guess the only way to do that is to create the PDF on a server with Adobe Acrobat Pro and send to the user browser a JPEG that will represent the PDF: If I do this operation in the PDF visor at the client browser, the problem is that it will will be mandatory to install Adobe Acrobat in each cliente because only this visor can manage javascript.
Can you tell me if this idea is correct? It is possible to use Adobe Acrobat on a Server to create PDF when some proccess needs?and what other Adobe product o procedure can we use to do that?
I only need to create a PDF mixing PDF Templete, field values and javascript.
Thanks for your help. -
Creating PDF using ITEXT API's - error
Hi,
In my WebDynpro Application I want to generate a PDF (using ITEXT API's) out of the data retrieved from back end system .
I used this source code.
Document document = new Document(PageSize.A4);
document.open();
PdfPTable table = new PdfPTable(1);
PdfPCell cell;
cell = new PdfPCell(new Paragraph("ONE"));
table.addCell(cell);
cell = new PdfPCell(new Paragraph("TWO"));
table.addCell(cell);
document.add(table);
document.close();
byte[] b = new byte[100 * 1024];
b = document.toString().getBytes("UTF-8");
IWDCachedWebResource pdfRes = WDWebResource.getPublicCachedWebResource(b, WDWebResourceType.PDF, WDScopeType.CLIENTSESSION_SCOPE, wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),"FileNameHelloText"));
I have used Window Manager to create a external window with the URL from pdfRes.getUrl() method.
After execution i get a pop up window with out PDF document.
Please let me know your thoughts & solutions to the above mentioned problem.
Thanks
SenthilHello Folks,
Use the following snippet of the code to generate PDF using ITEXT API.
Document document = new Document(PageSize.A4);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PdfWriter.getInstance(document, bos);
document.open();
PdfPTable table = new PdfPTable(1);
PdfPCell cell;
cell = new PdfPCell(new Paragraph("ONE"));
table.addCell(cell);
cell = new PdfPCell(new Paragraph("TWO"));
table.addCell(cell);
document.add(table);
document.close();
byte [] byteContent = bos.toByteArray();
IWDCachedWebResource cachedResource =
WDWebResource.getPublicCachedWebResource(
byteContent,
WDWebResourceType.PDF,
WDScopeType.CLIENTSESSION_SCOPE,
wdThis
.wdGetAPI()
.getComponent()
.getDeployableObjectPart(),
"TestPDF");
IWDWindow externalWindow =
wdComponentAPI
.getWindowManager()
.createExternalWindow(cachedResource.getURL(), "PDF Window",true);
externalWindow.open();
Thanks and Regards,
Gopi
Maybe you are looking for
-
Can Numbers Display Multiple Views of the Same Table
Hi, Excel and Appleworks both have a pull down tab on the vertical bar allowing multiple views into the same spreadsheet (table). Can Numbers do this? I have a set of calculations at the top of a spreadsheet that are based on years and years worth of
-
I'd like to have Photoshop start up on an external monitor with other applications running on the MacBook display. Is there a way to do that? All I've been able to do so far is drag individual photoshop windows to the external display which leaves th
-
Sharing Photo Stream On The Web
Creating a Photo Stream to share. One option is to open it to the public on the web. I tried one photo sharing via iCloud on the web. Where is the public photo on the web? Thanks.
-
Fetch Softworks iWeb 1.1
Does anyone have any experience using this product to publish to a folder and than FTP over to a hosting service. The host tells me they do not have the extensions loaded to support an upload directly from iweb??? But that I can FTP my site which wil
-
GetCoreResourceModificationDate could not get path to timestamp file
Porting my InDesign CS5.5 Plugin to InDesign CS6, when I build a debug version of the plugin and deploy it to the InDesign CS6 Debug version and launch InDesign I get "PlugInData::GetCoreResourceModificationDate could not get path to timestamp file: