How to create a sales document using BAPI_SALESORDER_CREATEFROMDAT2
Hai i was un able to create a sales order using the BAPI can you help me out
Sample Code:
clear: l_order_header,
l_salesdocument,
l_order_partners,
l_order_items,
l_order_schdl.
refresh: it_order_items,
it_order_partners,
it_order_schdl,
it_return.
???????? get from material ...
Order header
l_order_header-doc_type = 'ZQBV'.
l_order_header-distr_chan = '10'.
l_order_header-division = '00'.
if g_qals-werk eq '1100'.
l_order_header-sales_org = '1000'.
else.
if g_qals-werk eq '3100'.
l_order_header-sales_org = '3000'.
else.
message i001(00) with text-005.
endif.
endif.
l_order_header-purch_no_c = g_qals-prueflos. " <= lot
Partner data
l_order_partners-partn_role = 'AG'.
l_order_partners-partn_numb = g_qals-kunnr.
append l_order_partners to it_order_partners.
Order items => only one
l_order_items-itm_number = 10.
l_order_items-material = g_qals-matnr.
l_order_items-target_qty = 1.
append l_order_items to it_order_items.
Schedules for quantity
l_order_schdl-itm_number = 10.
l_order_schdl-req_qty = 1. " <= only 1 !
append l_order_schdl to it_order_schdl.
Conditions for value
l_order_conditions-itm_number = 10.
l_order_conditions-cond_type = 'PR00'.
l_order_conditions-cond_value = g_effort_sum.
l_order_conditions-currency = g_effort_unit.
append l_order_conditions to it_order_conditions.
BAPI to create sales order
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = l_order_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = l_salesdocument
TABLES
RETURN = it_return
ORDER_ITEMS_IN = it_order_items
ORDER_ITEMS_INX =
ORDER_PARTNERS = it_order_partners
ORDER_SCHEDULES_IN = it_order_schdl
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN = it_order_conditions
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
if not l_salesdocument is initial.
order successfully created
message i001(00) with text-001 l_salesdocument.
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
Regards,
Ravi
Similar Messages
-
Creating a sales document using BAPI in web dynpro by uploading a file
Hi ALL,
Can some one help me how to create a sales document using BAPI by uploading a file as input...Can someone provide me a sample program....
Thanks n Regards,
Praveenn.
Edited by: praveenn on Aug 23, 2011 12:42 PMHi Sri,
Thx for the response...
Here is the code that i followed for creating a BAPI_SALESORDER_CREATE1 by uploading a text file as input.
Just create a Attribute in the VIEW CONTEXT of type String.
method ONACTIONCREATE_SO .
types : Begin of ty_data,
sales_org type vkorg,
doc_type type AUART,
DISTR_CHAN type VTWEG,
DIVISION type spart,
material type matnr,
partn_role type PARVW,
PARTN_NUMB type kunnr,
end of ty_data.
DATA :it_table TYPE TABLE OF ty_data,
i_data TYPE TABLE OF string,
l_string TYPE string,
wa_table TYPE ty_Data,
l_xstring TYPE xstring,
fields TYPE string_table,
lv_field TYPE string.
DATA: wa_order_header_in TYPE BAPISDHD1,
it_order_items_in TYPE TABLE OF BAPISDITM,
wa_order_items_in TYPE BAPISDITM,
it_order_partners TYPE TABLE OF BAPIPARNR,
wa_order_partners TYPE BAPIPARNR,
it_return TYPE TABLE OF BAPIRET2,
wa_return TYPE BAPIRET2.
DATA : sales_doc type bapivbeln-vbeln.
DATA:
node_zfinal_node TYPE REF TO if_wd_context_node,
elem_zfinal_node TYPE REF TO if_wd_context_element,
stru_zfinal_node TYPE if_main_view=>element_zfinal_node .
get single attribute
wd_context->get_attribute(
EXPORTING
name = 'DATASOURCE'
IMPORTING
value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
LOOP AT i_data INTO l_string.
SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
READ TABLE fields INTO lv_field INDEX 1.
wa_table-sales_org = lv_field.
READ TABLE fields INTO lv_field INDEX 2.
wa_table-doc_type = lv_field.
READ TABLE fields INTO lv_field INDEX 3.
wa_table-DISTR_CHAN = lv_field.
READ TABLE fields INTO lv_field INDEX 4.
wa_table-DIVISION = lv_field.
READ TABLE fields INTO lv_field INDEX 5.
wa_table-material = lv_field.
READ TABLE fields INTO lv_field INDEX 6.
wa_table-partn_role = lv_field.
READ TABLE fields INTO lv_field INDEX 7.
wa_table-partn_numb = lv_field.
APPEND wa_table TO it_table.
ENDLOOP.
loop at it_table into wa_table.
clear : wa_order_header_in.
wa_order_header_in-sales_org = wa_table-sales_org.
wa_order_header_in-doc_type = wa_table-doc_type.
wa_order_header_in-distr_chan = wa_table-distr_chan.
wa_order_header_in-division = wa_table-division.
clear : wa_order_items_in.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_table-material
IMPORTING
OUTPUT = wa_order_items_in-material.
*wa_order_items_in-req_qty = wa_table-req_qty.
append wa_order_items_in to it_order_items_in.
clear : wa_order_partners.
wa_order_partners-partn_role = wa_table-partn_role.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_table-partn_numb
IMPORTING
OUTPUT = wa_order_partners-partn_numb
*wa_order_partners-partn_numb = wa_table-partn_numb.
append wa_order_partners to it_order_partners.
endloop.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
order_header_in = wa_order_header_in
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = sales_doc
tables
RETURN = it_return
ORDER_ITEMS_IN = it_order_items_in
ORDER_ITEMS_INX =
order_partners = it_order_partners.
ORDER_SCHEDULES_IN =
get message manager
DATA: l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager.
l_current_controller ?= wd_this->wd_get_api( ).
DATA: v_message_text TYPE string.
When Sales Order is created commit the data
IF NOT sales_doc IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING wait = 'X'.
CONCATENATE 'Sales Document' sales_doc 'has been created.' INTO v_message_text SEPARATED BY space.
Report Success message
CALL METHOD l_message_manager->report_success
EXPORTING
message_text = v_message_text.
ELSE.
v_message_text = 'Error Creating Sales Order'.
Report Error message
CALL METHOD l_message_manager->report_error_message
EXPORTING
message_text = v_message_text.
ENDIF.
endmethod.
Edited by: praveenn on Aug 30, 2011 2:41 PM -
How to create the sales order using BAPI's ....?
Hi Guru's,
could you please provide how to create the sales order using BAPI's .....i need step by step process and please provide the details from scratch....basically i don't have basic knowledge on this....please provide required inputs ....:)
thanks in advance
Srinivas......Hi Guru's thanks for your inouts and your valuble time...
please find the program logic below...
*& Report ZAREPAS30
REPORT zarepas30.
DATA : gs_vbeln TYPE vbak-vbeln,
gs_order_header_in TYPE bapisdhd1,
gs_order_header_inx TYPE bapisdhd1x,
gt_order_items_in TYPE STANDARD TABLE OF bapisditm,
gwa_itab1 TYPE bapisditm,
gt_order_items_inx TYPE STANDARD TABLE OF bapisditmx,
gwa_itab2 TYPE bapisditmx,
gt_order_partners TYPE STANDARD TABLE OF bapiparnr,
gwa_itab3 TYPE bapiparnr,
gt_return TYPE STANDARD TABLE OF bapiret2,
gwa_itab4 TYPE bapiret2.
Sales document type
PARAMETERS: p_auart TYPE auart OBLIGATORY.
Sales organization
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
Distribution channel
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
Division.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
Requested Delivery Date
PARAMETERS: p_edatu TYPE edatu OBLIGATORY.
Sold-to
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
Ship-to
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
Material
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
Quantity.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
Plant
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
gs_order_header_in-doc_type = p_auart.
gs_order_header_inx-doc_type = 'X'.
Sales organization
gs_order_header_in-sales_org = p_vkorg.
gs_order_header_inx-sales_org = 'X'.
Distribution channel
gs_order_header_in-distr_chan = p_vtweg.
gs_order_header_inx-distr_chan = 'X'.
Division
gs_order_header_in-division = p_spart.
gs_order_header_inx-division = 'X'.
Reguested Delivery Date
gs_order_header_in-req_date_h = p_edatu.
gs_order_header_inx-req_date_h = 'X'.
gs_order_header_inx-updateflag = 'I'.
Partner data
Sold to
gwa_itab3-partn_role = 'AG'.
gwa_itab3-partn_numb = p_sold.
APPEND gwa_itab3 TO gt_order_partners .
ship to
gwa_itab3-partn_role = 'WE'.
gwa_itab3-partn_numb = p_ship.
APPEND gwa_itab3 TO gt_order_partners .
ITEM DATA
gwa_itab2-updateflag = 'I'.
Line item number.
gwa_itab1-itm_number = '000010'.
gwa_itab2-itm_number = 'X'.
Material
gwa_itab1-material = p_matnr.
gwa_itab2-material = 'X'.
Plant
gwa_itab1-plant = p_plant.
gwa_itab2-plant = 'X'.
Quantity
gwa_itab1-target_qty = p_menge.
gwa_itab2-target_qty = 'X'.
APPEND gwa_itab1 TO gt_order_items_in.
APPEND gwa_itab2 TO gt_order_items_inx.
Line item number.
gwa_itab1-itm_number = '000020'.
gwa_itab2-itm_number = 'X'.
Material
gwa_itab1-material = p_matnr.
gwa_itab2-material = 'X'.
Plant
gwa_itab1-plant = p_plant.
gwa_itab2-plant = 'X'.
Quantity
gwa_itab1-target_qty = p_menge.
gwa_itab2-target_qty = 'X'.
APPEND gwa_itab1 TO gt_order_items_in.
APPEND gwa_itab2 TO gt_order_items_inx.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = gs_order_header_in
ORDER_HEADER_INX = gs_order_header_inx
IMPORTING
SALESDOCUMENT = gs_vbeln
tables
RETURN = gt_return
ORDER_ITEMS_IN = gt_order_items_in
ORDER_ITEMS_INX = gt_order_items_inx
order_partners = gt_order_partners.
Check the return table.
LOOP AT gt_return into gwa_itab4 WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error occured while creating sales order '.
ELSE.
Commit the work.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'Document ', gs_vbeln, ' created'.
ENDIF. -
How to create a sales order using a catlog numer
hi,
is it possible to create a sales order using a catlog number of the material .. did any one work on this type ... and how to maintain catalog number for a material?
thank you
mmnDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
How to create open sales order using BAPI....?
Hi Guru's,
please help me how to create open sales order and which BAPI i have to use for open sales order.
please provide any program logic related to this or step by step process.....
that would be helpful to me.
thanks in advance...
Srinivas....Hi sreenu,
Open PO or Open sales order means that the complete cycle is not complete. That means the Sales order is not completely delievered or is not billed or is not paid for. Only once the cycle is completed the order status shows as complete untill then its Open.
You can use VA05 to find open sales orders.
Similarlry open PO's are those PO's whos inbound delivery is not complete or whos goods receipt is not complete and whos payment is not done to the vendor
U cannot directly find the open PO and open SO from any table.
That u have to calculate from the status of the PO and SO and then check wheteher that is complete or not.
U have table VBUP for SO status.Check out the fields in that table
pls see the below link.
http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
http://msdn.microsoft.com/en-us/library/cc185190.aspx
thjanks
karthik -
How to create a sales order using PO ALE Idoc
Hi,
I have a purchase order in my ECC6 system, and output for this PO is ALE idoc.
Now I want to create a Sales order using that Idoc in the same system,
can anbody please tell the procedure
sreeramDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
How to create a sales order using bapi
hi
i need to create a sales order using bapi.
can any one help meDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
How to create a sales activity using BAPI_BPCONTACT_CREATEFROMDATA 170183
Hello everyone ,
Please help me to create a sales activity using this BAPI's :
BAPI_BPCONTACT_CREATEFROMDATA
BAPI_BPCONTACT_SAVEFROMMEMORY
BAPI_TRANSACTION_COMMIT
Ref. OSS 170183
advance thank for all
HalleyHere is an example. Values and partners depend on your config of course. I'm assuming you can define the local variables - the code is too long for me to post it.
* BAPI field initialization
LS_GENERALDATA-ACTIVITY_TYPE = 'Your value'.
LS_GENERALDATA-SALESORG = 'Your value'.
LS_GENERALDATA-DISTR_CHAN = 'Your value'.
LS_GENERALDATA-DIVISION = 'Your value'.
LS_GENERALDATA-FROM_DATE = SY-DATUM.
LS_GENERALDATA-TO_DATE = SY-DATUM.
LS_GENERALDATA-FROM_TIME = SY-UZEIT.
LS_GENERALDATA-TO_TIME = SY-UZEIT.
LS_GENERALDATA-REASON = 'Your value'.
LS_GENERALDATA-RESULT = 'Your value'.
LS_GENERALDATA-STATE = '0'.
LS_GENERALDATA-ACTIVITY_COMMENT = 'Your value'.
LS_GENERALDATA-PARTN_ROLE = 'AG'.
LS_GENERALDATA-PARTN_ID = 'Sold-to account number'.
APPEND LS_GENERALDATA TO LT_GENERALDATA.
LS_BUSINESSPARTNER-ITM_NUMBER = '000000'.
LS_BUSINESSPARTNER-PARTN_ROLE = 'AG'.
LS_BUSINESSPARTNER-PARTN_ID = 'Sold-to Account'.
APPEND LS_BUSINESSPARTNER TO LT_BUSINESSPARTNER.
* MRL notes
LS_NOTES-TDFORMAT = '*'.
LS_NOTES-TDLINE = 'Your long comments text here'.
LS_TEXT-TEXT_ID = '0001'.
LS_TEXT-FUNCTION = '009'.
LS_TEXT-LANGU = SY-LANGU.
LS_TEXT-TEXT_LINE = LS_NOTES.
APPEND LS_TEXT TO LT_TEXT.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
OWN_LOGICAL_SYSTEM = LV_SYS
EXCEPTIONS
OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
OTHERS = 2.
* Call BAPI
CALL FUNCTION 'BAPI_BPCONTACT_CREATEFROMDATA'
EXPORTING
SENDER = LV_SYS
TABLES
GENERALDATA = LT_GENERALDATA
BUSINESSPARTNER = LT_BUSINESSPARTNER
TEXT = LT_TEXT
RETURN = LT_RETURN.
* Check for error
LOOP AT LT_RETURN INTO LS_RETURN WHERE TYPE CA 'AEX'.
EXIT.
ENDLOOP.
IF SY-SUBRC NE 0.
REFRESH LT_RETURN.
CALL FUNCTION 'BAPI_BPCONTACT_SAVEFROMMEMORY'
TABLES
SALESACTIVITYIDOUT = LT_SALESACTIVITYIDOUT
RETURN = LT_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF. -
How to create a Sales Order using BAPI_SALESORDER_CREATEFROMDAT1 in VC
I am new to Visual Composer.
I read the tutorial and created a Model which fetches the Sales Orders from the R/3 using <b>BAPI_SALESORDER_GETLIST</b>, every thing worked fine.
I am trying to create a sales order in R/3 using <b>BAPI_SALESORDER_CREATEFROMDAT1</b>, following are the steps I did:
1)Create a model
2)Drag a model element(iView) on to the designer
3)Double click the iView and Drag the function <b>BAPI_SALESORDER_CREATEFROMDAT1</b> on to the iView Designer
Now my question is, for <b>BAPI_SALESORDER_CREATEFROMDAT1</b> there are some mandatory fields as mentioned in the document.
1. Mandatory entries:
ORDER_HEADER_IN :
DOC_TYPE Sales document type
SALES_ORG Sales organization
DISTR_CHAN Distribution channel
DIVISION Division
ORDER_PARTNERS..:
PARTN_ROLE Partner functions, SP sold-to party
PARTN_NUMB Customer number
ORDER_ITEMS_IN..:
MATERIAL Material number
REQ_QTY Order quantity in sales unit
I can pass the values of structure <b>ORDER_HEADER_IN</b> from a input form but how should I pass mandatory values for tables <b>ORDER_PARTNERS</b> and <b>ORDER_ITEMS_IN</b>.
Ideally I should have one form where I can send all the mandatory items in the form.
Thank you,
VamsiHi,
how did you return the materials in the Table View. I tried to do it, but it only returns one material?
Regards,
Matthias -
How to create a sales order using a quatation reference
Hi,
I have a created a quatation.Now i want to create sales order using that quatation as a reference.will u pls tell me the way of doing it.send me the sample code if any and send me the related information and links.
Regards,
KiranGo to VA01, enter the order type and then click on 'Create with Reference' and enter your quotation number there in the subsequent popup.
-
How to create the sales order using excell sheet thru BAPI's?
Hi Guru's,
In my excell sheet i had 11 sales order details ..now i wanted to create the sales order's sing BAPI's...?
could please guide me step by step.....that would be greatly helpfull to me...
Thanks in advance
Srinivas....Hi,
follow below steps.
1. Get the excel data into internal table, Build a internal table whcih fields are in bapi same order
2. call the Bapi and pass the table data to the bapi
3. after calling the bapi, call the commit bapi.
then only it will careates.
Regards
Ganesh -
Problem when creating a sales order using BAPI_SALESORDER_CREATEFROMDAT2
Hello All,
I am working on a requirement where i need to create a new sales order from old sales order (Not all the items of the old sales order are to be copied) i am doing this by getting the data using BAPISDORDER_GETDETAILEDLIST to get the old sales order details and send them to BAPI_SALESORDER_CREATEFROMDAT2.
My problem is that i when i send the condition also the system in addition to the conditions sent to the BAPI is also automatically proposing the condition types . So the final result is that the sales order ends up having the condition types twice .
For example VPRS AZWR are visible twice in the sales order.
Any inputs to solve the problem will be definitely rewarded.
Thanks in advance.
Regards,
Sowmya.Hello All,
I am working on a requirement where i need to create a new sales order from old sales order (Not all the items of the old sales order are to be copied) i am doing this by getting the data using BAPISDORDER_GETDETAILEDLIST to get the old sales order details and send them to BAPI_SALESORDER_CREATEFROMDAT2.
My problem is that i when i send the condition also the system in addition to the conditions sent to the BAPI is also automatically proposing the condition types . So the final result is that the sales order ends up having the condition types twice .
For example VPRS AZWR are visible twice in the sales order.
Any inputs to solve the problem will be definitely rewarded.
Thanks in advance.
Regards,
Sowmya. -
How to Create an FI document using a BAPI
Hi,
I have a requirement as under(for a report creation):
I need get all the Account numbers(from table BSIS) depending on the Posting date(BUDAT) and the Price difference accounts(HKONT) for the previous month(say 1/1 to 31/1).
After I get all the details from BSIS, I will have to get the Material Number(MATNR), Plant(WERKS), Local Currency, Foreign Currency, Material Quantity and etc., from BSEG(by comparing the Accounting Document Number) which is common in both the tables BSIS and BSEG.
Now, for all these docs, I need to create a single FI document(that has to cover all these documents) by using the Document type,Posting date and Reclassed Account number and some text has to be inserted into the Item text field.
I came to know that, we have to use a BAPI inorder for this purpose, I could not get the exact one.
Please help me in this regard by giving your valuable inputs.
Regards,
Vishnu.Continue..........
accountgl-itemno_acc = '2'.
accountgl-gl_account = 'WRITE UR GL NO'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = itab-budat.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = itab-prctr.
accountgl-alloc_nmbr = itab-zuonr.
accountgl-po_number = itab-ebeln.
accountgl-po_item = itab-ebelp.
* accountgL-DE_CRE_IND = 'S'.
APPEND accountgl.
currencyamount-itemno_acc = '2'.
currencyamount-currency = 'USD'.
currencyamount-amt_doccur = itab-grval.
APPEND currencyamount.
* zsched_line = zsched_line + 1.
***line itme 2
accountgl-itemno_acc = '1'.
accountgl-gl_account = 'YOUR GL NO'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = itab-budat.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = itab-prctr.
accountgl-alloc_nmbr = itab-zuonr.
* accountgl-po_number = itab-ebeln.
accountgl-po_item = itab-ebelp.
* accountgL-DE_CRE_IND = 'H'.
APPEND accountgl.
currencyamount-itemno_acc = '1'.
currencyamount-currency = 'USD'.
itab-grval = itab-grval * -1.
currencyamount-amt_doccur = itab-grval.
APPEND currencyamount.
ELSE.
documentheader-username = sy-uname.
CONCATENATE itab-mblnr itab-mjahr INTO documentheader-header_txt.
documentheader-comp_code = '1000'.
documentheader-doc_date = itab-bldat.
documentheader-pstng_date = itab-budat.
documentheader-doc_type = 'SA'.
documentheader-ref_doc_no = itab-xblnr.
* documentheader-BUS_ACT = 'F-02'. -
How to create a PDF document using WDA
Hi Experts,
Wish you a happy new year 2011.
As part of the project, I have following requirement. User will click on a link in SAP ESS. On clicking on the link, WDA program will be called. This program will display PDF. The PDF will show the pernr and employee name. How to do it?
Regards,
GaryHi Gary ,
You have to create a attribute of type XSTRING and bind it the ui elemrnt interactive form's pdf source. Then you have to bind the template with the required object structure. Then you requir to make the layout as per your requirmrnt.
Alternatively go to form builder (SFP) then create a interface . Create your layout. Create a context node and populate this node in the method wddoinit from the table. Then in in the main view of your web dynpro component create a UI element of interactive form and set the data source and template source.
I think second scenario match with your requirment .
Interactive form ui element properties :-
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0f/128841e8231709e10000000a155106/content.htm
Wishing you a happy and prosperous new year ahead.
Thanks & Regards,
Monishankar Chatterjee -
How to Create a PDF Document and apply Digital Signature in C# using the Adobe SDK?
Hi Everybody!
I have to do two distinct tasks here:
1) How can I create a PDF document using the Adobe SDK in my .NET Applications(C# - 2.0)?
I just need a basic sample to create a document with a simple text, for example. I did not find any useful information in the adobe documentation. I have the Acrobat Professional 8.0 in my computer, but it's very dificult to work whith de Acrobat.dll and .NET with a poor documentaion.
2)How can I apply digital signature in a existent pdf document?
I need to sign documents using the SDK, just a basic sample in c# would be helpful to start!
Anybody could help?
Thank in advance!Leonard Rosenthol or anybody that can help, sorry to insist.
I will explain better my problem:
I have an ASP.NET WebPAge (C# - 2.0). In this page, the user make a request. The request should generate a PDF document with the informations of the request and with a field to add a digital signature. The document created will be send to a approver that will confirm the approval applying his digital signature (I need to do too, a webpage where the approver open the page, choose the pdf document, and sign, just selecting his own certificate and clicking in the button SIGN... but this is another problem).
That's the reason that I have to create a PDF document. If I create a WORD or HTML document, and then convert to PDF, how can I add a field to digital signature in this pdf document?
Is there any solution using Acrobat SDK?
Thank you very much!
Maybe you are looking for
-
Error when using Variable Transport Binding in Sender Mail Adapter
Hi, I am using the Sender Mail Adapter to receive an email, convert the attached tab delimited text file into xml and map it to an IDOC. I am using PayloadSwapBean and MessageTransformBean in order to do this, and this all works perfectly. I am now t
-
Ssrs 2008 r2 black line incorrectly being displayed
In an existing SSRS 2008 r2 report, I just added a page header so that I can display global values in the page header like run date, run time, and page number. Within the report header, I placed all the report header data within a rectangle. Now when
-
Importing MS Word formatted document, format changes!?
I'm showing my ignorance of this product again (and apologies for that being the case, as I'm really trying to get up to speed on this product but seem to keep failing at it... I swear I actually did understand PageMaker and other similar products w
-
Hi, can someone tell me the clear steps for install "StarfireExt.jar"? I have copy it to both C:\j2sdk1.4.1\jre\lib\ext and C:\Program Files\Java\j2re1.4.1\lib\ext. Is it something missing? The other problem is when I run the program by using Loader3
-
Concatenation of 2 return value LOV query
LOV query with 2 columns in the return_value