FM/BAPI to create a accrual document in FBS1 ?
Hi,
Id any one aware of any BAPI or FM that can be used to create and accrual document through FBS1.
Thanks,
How about BAPI_USER_ACTGROUPS_ASSIGN ...?
(Found searching SE37 with pattern "BAPIUSER" ...)
<u>Take care</u>: when using an CUA you might need to use BAPI_USER_LOCACTGROUPS_ASSIGN (to assign roles in the CUA master system).
Similar Messages
-
BAPI to create a billing document with reference to delivery or sales order
Hi,
Does anyone know any BAPI or function module that allows the creation of a billing document with reference to a sales order or to a delivery.
Maybe the BAPI_BILLINGDOC_CREATEFROMDATA may be used to create a billing document with reference to a sales document, but i'm looking for a solution where I only need to indicate the number of the reference sales order or the reference delivery and maybe some few data more without the need of transfer all the items and conditions information.
Thanks.
Kind regards,
Paulo SousaHello Paulo,
To create a billing document based on a delivery use BAPI_BILLINGDOC_CREATEMULTIPLE. In table BILLINGDATAIN insert one line with the following data:
REF_DOC = Delivery number
REF_DOC_CA = 'J'
If it runs fine, table SUCCESS will bring back useful data, like BILL_DOC (Billing document number).
Regards,
Joã -
Error while using BAPI to create Goods Receipt Document
Hello All,
While using the bapi BAPI_GOODSMVT_CREATE to create Goods receipt document ,the following error is encountered:-
Error Message:FOR OBJECT XABBELEGNR,NUMBER RANGE INTERVAL DOES NOT EXIST OM36.
Do we need to create a number range object ??If yes,how and where to create ?
Thanks,
Deepti.Hi Deepti!
There is only a valid interval missing, not the whole object.
Maintenance can be done via transaction SNRO, enter your object XABBELEGNR in entry screen. (Alternatively use transaction OMJ6).
Push button 'Number Ranges' and 'Change Intervals'. Here you can define an interval.
Regards,
Christian -
Generic BAPI to create attachment to document?
Hello,
I'm trying to locate an existing BAPI to attach a file (i.e. pdf) to an expense report. There's nothing in the travel section, but I'm hoping there might be a generic BAPI to attach files to SAP document #'s. Any help is appreciated.
- JonathanThis question really doesn't belong in the Web Dypro ABAP forum. It should be in one of the general ABAP forums.
However what you want sounds like the generic object attachement - provided by the Generic Object Services framework. There are a series of classes for this functionality. You can read some documentation about it here:
[http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm]
I don't know if there is a BAPI for this functionality since it is a class based API, but it wouldn't be difficult to wrap the classes in an RFC if you need they remotely. Otherwise just work with the classes directly. -
Hi All
I created an accrual document in FBS1 and then reversed it using F.81;
however, apparently it has been reversed in the wrong period - so i need to reverse the document generated from F.81
But i m not able to do either using FB08, or FBRA
Can anyone please guide me as to how to proceed with this
Thank you
RukshanaHi.
For example you posted accruals in 1 period and reversed in 3(but req period 2)
1 way So try to do in this way Post accrual in 3 period with reversing in 1 period. In this way you'll reset your previuse action.
2 way go FBR2 and create documents with "Generate reverse posting" for doc which were create thru F.81 -
How to create an Accounting Document by calling BAPI
Hai friends ,
please tell me how to call this BAPI and fulfill all the parameters .. Please help me , I dont know the head and tail of it ...
create an Accounting Document by calling BAPI BAPI_ACC_DOCUMENT_POST
Below is the step to fill the parameters for BAPI:
Enter company code, invoice no, invoice date, document type, header text into DOCUMENTHEADER
Enter customer, item text, company code, payment term into ACCOUNTRECEIVABLE
Enter offset account, company code, document type, item text into ACCOUNTGL
Enter currency type u201800u2019, currency, exchange rate, amount into CURRENCYAMOUNT. Please note there will be two rows in this table, one positive amount and one negative amount
Call the BAPI to create the AR document. If p_check is checked, call the BAPI only without COMMIT and then do the message processing
If p_check is initial, COMMIT the data to the database tables.
Check the RETURN table after each BAPI, if no u2018Eu2019 message type found, output the document no. Otherwise, output the error messge to the screen with the message type u2018Eu2019.
thanks in advance ...Hi,
Check the link
http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=617
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-error-1973720
http://delaynomore.spaces.live.com/blog/cns!D2BFFB84EDFE4189!528.entry
http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
http://www.sapfans.com
Anurodh -
How to create shipment cost document through BAPI?
Hi SAP Guru,
My requirement is to create shipment cost document through BAPI.
Is there any standard BAPI to create Shipment cost documents? If any buddy no please help me out.I am in client place i have find out the solution..
Thanks & Regards,
Pankaj SinhaHi Pankaj,
See the following link for more help.
IDOC/BAPI for changing Shipment cost number/document
Regards -
BAPI to create Billing DOC for deliveries
Hi All,
I am looking for a BAPI to create a billing document based on the Shipment number.
I found Bapi_BILLINGDOC_CREATEMULTIPLE, but not working as expected.
If anyone has used above or another bapi, please inform.
Thx-PraveenHi Praveen,
i'm using same bapi and i'm able to create the invoice for the del.doc.
for your ref. , here i'm attaching the code , please go through once.
LS_BAPIVBRK-REF_DOC = DELIVERY_NO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = LS_BAPIVBRK-REF_DOC
IMPORTING
OUTPUT = LS_BAPIVBRK-REF_DOC.
LS_BAPIVBRK-REF_DOC_CA = '8'. Shipment
APPEND LS_BAPIVBRK TO LT_BAPIVBRK.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
BILLINGDATAIN = LT_BAPIVBRK
ERRORS = LT_BAPIVBRKERRORS
RETURN = LT_BAPIRET1
SUCCESS = LT_BAPIVBRKSUCCESS.
after this do commit.
you might miss the document category .
Regards,
Krishna -
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 Manual Accruals in Rebate Agreements via BAPI or ?
I have a requirement to mass create Manual Accruals in Rebate Agreements ( ie. go into VBO2, put in your Agreement No and execute, then choose ACCRUE button, put a value in Accrual To Post field abd SAVE -> a sales doc is created ).
I don't want to use BDC as it will be tricky to handle the second screen. There is a BAPI BAPI_AGREEMENTS but I can't find any worthwhile documentation or example code for using it, and I'm not sure if it has the required functionality at first glance.
I am now looking at creating the B4 sales docs directly with the Sales Doc create BAPI but can't see a way to link them to the Rebate Agreement number !?
Regards, J
Edited by: Jonathan Ackers on Feb 7, 2011 4:22 PMDid you find an answer to this? If not if any one has an answer for this please reply.
-
Bapi or FM to create a downpayment document(F-47)
Hi,
Need an FM/BAPI to create an down payment document similar to F-47
Document type : KA
Spl G/L Acc Indicator : A
Account = Vendor No
Regards
ShivaRFIDPT_ACC_DOCUMENT_POST_ADJ, conforme mapeamento dos campos abaixo:
T_ACCHD
Descrição do Campo
Tabela/Valor Fixo
Coluna
MANDT
Mandante do sistema
SY-MANDT
AWTYP
Operação de referência
BKPF
GLVOR
Ação de negócio
RFBU
TCODE
Código da transação
F-47/FBA6
BKTXT
Texto de cabeçalho do documento (código do aprovador)
USNAM
Nome do usuário
SY-UNAME
T_ACCIT
Descrição do Campo
Tabela/Valor Fixo
Coluna
MANDT
Mandante do sistema
SY-MANDT
POSNR
Número do item
Sequencial
BUKRS
Código da empresa
GJAHR
Ano do exercício fiscal
BUZEI
Número do item do documento
BLDAT
Data do documento
BUDAT
Data do lançamento
BLART
Tipo do documento
KA
XBLNR
Referência do documento
VORGN
Ação de negócio
AZAF
BUPLA
Local de negócio
UMSKZ
Código do razão especial
F
ZUMSK
Código de Razão Especial de destino
B
BSTAT
Status do documento
S
BSCHL
Chave de lançamento
39
SHKZG
Direção do movimento (D/C)
H
KOART
Tipo da conta: determina se aborda o livro Razão ou os livros auxiliares
K
LIFNR
Código do fornecedor
ZTERM
Condição de pagamento
C001
ZFBDT
Data base para pagamento
ZLSPR
Chave para o bloqueio de pagamento
W
EMPFB
Recebedor de pagamento/pagador
ZOUNR
Atribuição do item
SGTXT
Texto do item
PRCTR
Centro de lucro
PPRCTR
Centro de lucro do parceiro
KIDNO
Referência do pagamento
NEBTR
Valor do documento (+/-)
T_ACCCR
Descrição do Campo
Tabela/Valor Fixo
Coluna
MANDT
Mandante do sistema
SY-MANDT
POSNR
Número do item
Sequencial
WAERS
Código da moeda
BRL
WRBTR
Montante do item -
Bapi for creating documents in cv03n
hi!
i am looking for a bapi to create document in cv03n and open an objectlink tab.
I need to transfer the following parameters:
document type = 'ENG'
tables:
objectlink: objecttype = 'AENR'
objectkey = change number field.
regards
yifathi!
i used the create item to open document and that was o.k,
but i also wanted to open objectlink tab and it didnt work.
i transfered documentdata-doctype = 'ENG'.
objectlinks-OBJECTTYPE = 'AENR'
objectlinks-OBJECTKEY = value of change
number
the system grants documentnumber internally and automatically.
regards
yifat -
Bapi to create finance document for a customer
Hi ,
Can any one of you please tell me how to create a finance document of type(BLART ex: Z3) for a customer with the details customer number , invoice number, Billing date(baseline date) and a price value , G/L account number, Payment terms , Payment method , Due days, Text.
Please tell me BAPI name and also tell me how to pass the data to that bapi.
Thanks in advance.
Regards,
Manju
Edited by: manj1325 on Jan 13, 2010 8:38 AMYa Thank you very much.
I will give you the fields that i need to pass please let me how to pass and where to pass.
Accounting document number (BELNR)
customer
baseline date(ZFBDT)
price(WRBTR)
G/L account number (SAKNR)
payment terms(ZTERM)
payment method(ZLSCH)
due days(VERZN)
text(SGTXT)
and document type(BLART) - Z3
Please let me.I have not time to analyse it now.Thats why i am asking.
Thanks in advance
Edited by: manj1325 on Jan 13, 2010 11:10 AM -
Please help with this bapi for creating billing document
I want to create a billing document using the bapi: BAPI_BILLINGDOC_CREATEMULTIPLE from a delivery number and NOT A SALES ORDER.
Please tell me what details to be passed to table BILLINGDATAIN . Please don't provide me function module documentation because it does n't help me create billing document from delivery. A sample source code or suggestion to what to pass would be really great!
Thanks,
Krishen
P.S. Points assured for helpful answers and thanks for your time.Hi,
Try this..
DATA: s_vbap TYPE vbap.
TABLES: vbak,vbap,likp, lips.
DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.
DATA: t_conditions TYPE STANDARD TABLE OF bapikomv WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.
DATA: t_ccard TYPE STANDARD TABLE OF bapiccard_vf WITH HEADER LINE.
DATA: t_errors TYPE STANDARD TABLE OF bapivbrkerrors WITH HEADER LINE.
DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE
PARAMETERS: p_vbeln TYPE vbeln.
select single * from likp
where vbeln = p_vbeln.
SELECT SINGLE * from lips where
vbeln = likp-vbeln.
t_billing-salesorg = likp-vkorg.
t_billing-ref_doc = likp-vbeln.
t_billing-ref_item = lips-posnr.
t_billing-doc_number = p_vbeln.
t_billing-itm_number = lips-posnr.
t_billing-ordbilltyp = 'ZINV'.
t_billing-price_date = sy-datum.
t_billing-ref_doc_ca = likp-vbtyp.
t_billing-material = lips-matnr.
t_billing-plant = lips-werks.
APPEND t_billing.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = t_billing
return = t_return
success = t_success
commit work.
Thanks,
Naren -
LSMW me51n, how to create one PR document for all the records in the file
HI all,
I need to create LSMW for t-code me51n -Create Purchase Requisition. I`m using Bapi BUS2105, method CREATEFROMDATA, idoc message type PREQCR, basic type PREQCR03. The problem is that the LSMW is creating different idoc and different PR document for every record in the source file. My requirement is to create one PR document for one source file (Every source file is different Purchase Requisition) . I`m trying to do this with writing some code(global functions ) in the 'Mapping and conversion rules' events - BEGINOF_TRANSACTION_, ENDOF_TRANSACTION__..., but i`m not very sure what exactly i`m doing .
Please help me resolve this problem, any help will be appreciated .
Best regards, Emil Milchev.Thank you for you answer.
But I have found faster way of doing it - two source structures, one HEADER and ONE ITEM.
HEADER: one empty text field and identificator for it.
ITEM: everything else.
Then everything was just fine, i`ve mapped the different IDOC segments by PREQ_ITEM fields (equal values in the source file : 10-10-10..., 20-20-20,.... etc.) and put all required fields for my LSMW
SOURCE FIELDS:
Z_ME51N_V2 - MASS_UPLOAD - CREATE create
Source Fields
UPFILE upload file
IDENT C(010) ident
Identifing Field Content: header
TEXT C(001)
UPFILE2 123
IDENT C(010) ident
Identifing Field Content: item
BSART C(004) Document type
BANFN C(010) Purchase requisition number
BNFPO_FOR_MAP N(005) Item number of purchase req. for MAPPING acc.
BNFPO N(005) Item number of purchase requisition
KNTTP C(001) Account assignment category
PSTYP C(001) Item category in purchasing document
MATNR C(018) Material Number
WERKS C(004) Plant
LGORT C(004) Storage Location
MENGE N(013) Purchase requisition quantity
EKGRP C(003) Purchasing group
KONNR C(010) Number of principal purchase agreement
KTPNR N(005) Item number of principal purchase agreement
LIFNR C(010) Desired Vendor
FLIEF C(010) Fixed Vendor
AFNAM C(012) Name of requisitioner/requester
PREIS AMT4(011) Price in purchase requisition
ABLAD C(025) Unloading Point
WEMPF C(012) Goods Recipient
PS_POSID C(024) Work Breakdown Structure Element (WBS Element)
KOSTL C(011) COST_CTR v bapito ?
NAME1 C(040) Name1 - Name of an address
NAME2 C(040) Name2 - Name of an address 2
STREET C(060) Street
DELIVERY_DATE C(008) Date on which the goods are to be delivered
TEXT C(132) item text
STRUCTURE RELATIONS :
Structure Relations
E1PREQCR Header segment <<<< UPFILE upload file
E1BPEBANC Transfer Structure: Create Requisition Item <<<< UPFILE2 123
E1BPEBKN Transfer Structure: Create/Display Requisition Acct Assgt <<<< UPFILE2 123
E1BPEBANTX BAPI Purchase Requisition: Item Text <<<< UPFILE2 123
E1BPESUHC Communication Structure: Limits <<<< UPFILE2 123
E1BPESUCC Communication Structure: Contract Limits <<<< UPFILE2 123
E1BPESLLC Communication Structure: Create Service Line <<<< UPFILE2 123
E1BPESKLC Create Comm. Structure: Acct Assgt Distr. for Service Line <<<< UPFILE2 123
E1BPESLLTX BAPI Services Long Text <<<< UPFILE upload file
E1BPMERQADDRDELIVERY PO Item: Address Structure BAPIADDR1 for Inbound Delivery <<<< UPFILE2 123
E1BPMERQADDRDELIVERY1 PO Item: Address Structure BAPIADDR1 for Inbound Delivery <<<< UPFILE2 123
E1BPPAREX Ref. Structure for BAPI Parameter EXTENSIONIN/EXTENSIONOUT <<<< UPFILE2 123
MAINTAIN FIELD MAPPING AND... :
the MAPPING between two IDOC`s segments:
In first segment:
E1BPEBANC Transfer Structure: Create Requisition Item
Fields
PREQ_NO Purchase requisition number
Source: UPFILE2-BANFN (Purchase requisition number)
Rule : Transfer (MOVE)
Code: E1BPEBANC-PREQ_NO = UPFILE2-BANFN.
PREQ_ITEM Item number of purchase requisition
Source: UPFILE2-BNFPO (Item number of purchase requisition)
Rule : Transfer (MOVE)
Code: E1BPEBANC-PREQ_ITEM = UPFILE2-BNFPO.
In second segment :
E1BPEBKN Transfer Structure: Create/Display Requisition Acct Assgt
Fields
PREQ_NO Purchase requisition number
PREQ_ITEM Item number of purchase requisition
Source: UPFILE2-BNFPO_FOR_MAP (Item number of purchase req. for MAPPING
Rule : Transfer (MOVE)
Code: E1BPEBKN-PREQ_ITEM = UPFILE2-BNFPO_FOR_MAP.
After that everything was OK .
Maybe you are looking for
-
how can i put this album on my computer so i can move it to my ipad as well
-
BBP purchase order cannot be changed in R/3. Can only be displayed.
Hi, (1) I am trying to changes the Payment term in the PO from 0012 to 0000. But getting error as "BBP purchase order cannot be changed in R/3" (2) As Invoice is already booked against this PO. I feel the change Payment terms will not come in the pic
-
Firefox incompletely open and will not close
Firefox will not open. Message says the program is damaged. But when I try to delete the Firefox aps the message tells me I cannot delete it because it is open. Nothing, however, appears on my screen. Firefox is both open and invisible. I cannot comp
-
Hide Excel Chart Legend Using LabVIEW Report Generation Toolkit or Active
Hello Eveyone: I work on the report generation toolkit in labview and creat the report in excle. I create the chart into report but I can't hide the chart legend or change the font size using report generation toolkit. I appriciate you guys time. Tha
-
Layer 3 Web redirect without MD DNS Server
Hello there Actually, I want to configure layer 3 web redirect and i dont have any DNS server. I tried to use the core switch to resolve the name into ip through the comment ip host webauth 1.1.1.1 but it did not work, I am using the DHCP currently l