FB01 BDC substitution problem
Hi,
I wrote a batch program to transfer GL data from text file to SAP. It uses FB01.
Everything works fine except for some GL accounts that do not need cost center input. When such account inserted my program has an error
saying that there is no field 'COBL-KOSTL' in the form.
To fix the problem my program has to access substitution rule and either insert or not incert line: PERFORM bdc_field USING 'COBL-KOSTL' itab-kostl. "Cost center
Question: how to access substitution rules from ABAP program? Or may be I have to access basic set generated by substitution? Or may be any other way?
Thank you,
Vitaly
Hi,
These tables might help you.
GB03 Validation/Substitution User
GB03T Validation/Substitution Application Area T
GB31 Validation/Substitution Callup Points
GB31T Validation/Substitution Callup Point Text
GB907 Rule: Usage of Rules in Substitutions
GB92 Substitutions
GB921 Substitution Conditions
GB921T Substitution: Text Table for Substitution
GB922 Substitution Constants
GB925 Usage of Substitutions
GB92T Texts for Substitutions
I have not checked the details of which table to use exactly but I am sure it would help you in some sense.
Regards
Nishant
Similar Messages
-
Posting intercompany items in FB01 (business area problem)
Hi guys,
Have you tried posting intercompany items in FB01?
My problem occured when i tried to post concur documents in FB01.
In line item1, i didn't enter a business area.
In line item2, i entered business area 0005.
I clicked simulation.
The business area in line item 1 is now populated with 0005.
When i debug the program, item 1's business area was populated because of OSS notes 566083.
I look for OSS notes that may solve this problem but i haven't found any.
I considered using the substitution exit that is called before simulation, but i'm afraid it might cause conflict in other modules!
Help.
Any suggestion is highly appreciated.
warm thanks,
naviHi Prabhu,
Thank you so much for sharing your thoughts.
Yes, i ikow I can manipulate the business area's value in a substitution exit.
But the problem is, the OSS note was called after the line item passed through the substitution exit.
Meaning the filling-up of the BA happens after the program executed the substitution exit.
It could have solved the problem if the substitution exit comes after the OSS note but its not the case, so I really can't use that exit.
I search for another exits that occurs when simulation was ticked, but there's none.
I asked my functional to ask SAP for OSS notes that may solve this problem and I am also conducting thorough investigation in my end.
Do you have any other idea regarding this problem?
Thanks again so much in advance.
Navi -
Font encryption and substitution problems
Please let me know whether Adobe content server has the option to verify a pdf for font encryption and substitution problems.
regards,
SashiNo, for anything other than basic format issues you will want to use Acrobat for verification and modification of the PDF file.
-
hi,
i am posting the FB01 orders
my validations are
if z<table>-G/ L account = flat file (G/L account).
then proccess FB01.
else.
message i000 ' G/l account are not matched'.
proccess FB01.( here bdc need to submitted by "Incorrect" , but it is processed in FB01 ).
can you any one tell,how will incorrect this process the FB01.
ASAP.
by kumar.Hi Prathap,
Could you be more specific, I don't undertand what do your problem is.
Regards,
Eric -
hi,
i am create a programm for f-27 type DG by bdc session method
when i execute it on 3rd screen of execution it ask for the values for PAYMENT TERMS but in manual entry OF F-27 it does not TAKE ANY PAYMENT TERMS. plz check my code and tell me where is the problem in coding.
CODES:
REPORT zcrdtdgupld
NO STANDARD PAGE HEADING LINE-SIZE 255.
*INCLUDE zdata_declarations.
I N T E R N A L T A B L E *
DATA: BEGIN OF wa_data,
bldat TYPE BDC_FVAL, "Document Date10
blart TYPE BDC_FVAL, "Document Type
bukrs TYPE BDC_FVAL, "Company Code
budat TYPE BDC_FVAL, "Posting Date10
monat TYPE BDC_FVAL, "Period
waers TYPE BDC_FVAL, "Currency
xblnr TYPE BDC_FVAL, "Reference Field
docid TYPE BDC_FVAL, "Document ID
newbs TYPE BDC_FVAL, "Posting Key
newko TYPE BDC_FVAL, "Account Code
wrbtr TYPE BDC_FVAL, "Amount in Documentcurrency
zfbdt TYPE BDC_FVAL, "Baseline Date10
newbs2 TYPE BDC_FVAL, "Account Key2
newko2 TYPE BDC_FVAL, "Account code2
wrbtr2 TYPE BDC_FVAL, "bseg-wrbtr,"Amount2
kostl TYPE BDC_FVAL, " cost center
prctr TYPE BDC_FVAL, " profit center
END OF wa_data.
D A T A *
DATA: it_data LIKE TABLE OF wa_data.
DATA: it_bdcdata TYPE TABLE OF bdcdata.
DATA: wa_bdcdata LIKE LINE OF it_bdcdata.
DATA: v_file TYPE string.
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b.
PARAMETERS : pa_file LIKE fc03tab-pl00_file OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b.
AT SELECTION-SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file.
PERFORM get_file USING pa_file.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
v_file = pa_file.
*uploading flat file into internal table
PERFORM upload_file USING v_file CHANGING it_data.
*open the session
PERFORM open_session.
*POPULATING THE BDCDATA
LOOP AT it_data INTO wa_data.
REFRESH it_bdcdata.
PERFORM bdc_dynpro USING 'SAPMF05A' '0100' 'X'.
PERFORM bdc_field USING 'BDC_CURSOR' 'RF05A-NEWKO'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'BKPF-BLDAT' wa_data-bldat.
PERFORM bdc_field USING 'BKPF-BLART' wa_data-blart.
PERFORM bdc_field USING 'BKPF-BUKRS' wa_data-bukrs.
PERFORM bdc_field USING 'BKPF-BUDAT' wa_data-budat.
PERFORM bdc_field USING 'BKPF-MONAT' wa_data-monat.
PERFORM bdc_field USING 'BKPF-WAERS' wa_data-waers.
PERFORM bdc_field USING 'BKPF-XBLNR' wa_data-xblnr.
PERFORM bdc_field USING 'FS006-DOCID' wa_data-docid.
PERFORM bdc_field USING 'RF05A-NEWBS' wa_data-newbs.
PERFORM bdc_field USING 'RF05A-NEWKO' wa_data-newko.
PERFORM bdc_dynpro USING 'SAPMF05A' '0301' 'X'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'BSEG-WRBTR' wa_data-wrbtr.
PERFORM bdc_field USING 'BSEG-ZFBDT' wa_data-zfbdt.
PERFORM bdc_field USING 'RF05A-NEWBS' wa_data-newbs2.
PERFORM bdc_field USING 'RF05A-NEWKO' wa_data-newko2.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300' 'X'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.
PERFORM bdc_field USING 'BSEG-WRBTR' wa_data-wrbtr2.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002' 'X'.
PERFORM bdc_field USING 'BDC_CURSOR' 'COBL-PRCTR'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTE'.
PERFORM bdc_field USING 'COBL-KOSTL' wa_data-kostl. "'101902'
PERFORM bdc_field USING 'COBL-PRCTR' wa_data-prctr.
PERFORM bdc_insert USING 'F-27' it_bdcdata.
ENDLOOP.
*close the session
PERFORM close_session.
*& Form get_file
text
-->P_PA_FILE text
FORM get_file USING p_pa_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = syst-repid
field_name = 'PA_FILE'
CHANGING
file_name = pa_file.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " get_file
*& Form upload_file
text
-->P_V_FILE text
<--P_IT_DATA text
FORM upload_file USING p_v_file
CHANGING p_it_data LIKE it_data.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_v_file
filetype = 'DAT'
has_field_separator = '#'
TABLES
data_tab = p_it_data.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " upload_file
*& Form open_session
text
--> p1 text
<-- p2 text
FORM open_session .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
DEST = FILLER8
group = 'JAYANT'
HOLDDATE = FILLER8
keep = 'X'
user = sy-uname.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " open_session
*& Form bdc_dynpro
text
-->P_0043 text
-->P_0044 text
FORM bdc_dynpro USING program TYPE BDC_PROG
dynpro TYPE BDC_DYNR
dynbegin TYPE BDC_START.
wa_bdcdata-program = program.
wa_bdcdata-dynpro = dynpro.
wa_bdcdata-dynbegin = dynbegin.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0048 text
-->P_0049 text
FORM bdc_field USING fnam TYPE FNAM_____4
fval TYPE BDC_FVAL.
wa_bdcdata-fnam = fnam.
wa_bdcdata-fval = fval.
APPEND wa_bdcdata TO it_bdcdata.
CLEAR wa_bdcdata.
ENDFORM. " bdc_field
*& Form bdc_insert
text
-->P_0183 text
-->P_IT_BDCDATA text
FORM bdc_insert USING p_tcode TYPE sytcode
p_it_bdcdata LIKE it_bdcdata.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = p_tcode
TABLES
dynprotab = p_it_bdcdata.
ENDFORM. " bdc_insert
*& Form close_session
text
--> p1 text
<-- p2 text
FORM close_session .
CALL FUNCTION 'BDC_CLOSE_GROUP'.
ENDFORM. "close_session
plz help me in this programm
thanks
jayant.why not post this in the ABAP forum?
You expect Basis people to help you on this one? -
Hy,
I get following problem with Varibale Substitution in Receiver File Adapter.
<b>"2006-04-19 14:10:39 CEST: Error: Message processing failed: Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '001')', probably configuration error in file adapter (XML parser error)'"</b>
My file has following structure(message typ)
level1
recordset
fieldsa String 1
fieldsb String 1
level2 Element 1
fields1 String 1
fields2 String 1
and Adapter configuration is
Folder : data\%w%\
filename : file%r%.txt
w payload:level1,1,level2,1,fields1,1
r payload:level1,1,level2,1,fields2,1
Could anyone see my problem
cheersHi,
Is this is your structure
level_1
-level_x
-fields_a String 1
-fields_b String 1
-level_2 Element 1
-fields_1 String 1
-fields_2 String 1
If so the variable substitution looks ok.
w payload:level_1,1,level_2,1,fields_1,1
r payload:level_1,1,level_2,1,fields_2,1
First Option-
1) Remove the _ (Underscores) and check it -Refer SAP Note 850694
2) Remove the Directory Susbtsitution - by giving static path for the File Directory
3) If it works in 2nd step, there is a error in the Variable Sustitution for the Directory .( check SAP help mentioned in my earlier reply)
Hope this helps,
Regards,
Moorthy -
BDC upload problem in hr master
Hi,
we are facing a problem in BDC upload for hr master tcode pa40.
we want to stop bdc after 2 screens only and not process further screens. how to do this?
please help
Thanks.Hi,
If you are using Session Mode :
After 2nd screen's is porcessed Use \BEND in the ok code field of BDC TABLE.
This will work,
Regards,
Gurpreet. -
Substitution problem in VO with viewlink and not in expert mode
Hi All
i have to extend a VO ,standar VO is not in expert mode so i made it and then extended the VO(need to add two new date columns) and substituted the BC4j ,i was involved in this discussion also
Re: Substitute ViewObject. Urgent!!!!! Thank you
,and i was aware that viewlinks should take care by substituion itself ,but in my case it is creating problem ,first it has thrown the error given below
oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidParamException: JBO-25006: Invalid parameter value PoRequisitionLinesVO for source passed to method ViewLinkImpl.setSource. Explanation: view def mismatch
then i modified the VOExRowImpl and added the viewlink setter getter from seede Rowimpl ,now it it not throwing the InvalidParamException ,but throwin OAAttrValException saying get method for LineNum is not resolved ,now i m puzzeled what is going on ,i m sure i have not made any mistake in substitution, any clue would be very helpful for me ,please throw some light on this issue
thanx
Pratapthanx kumar, nice to see your reply.
basic requirement is i have to create two date fileds on the requsition line form ,it shud appear on the basis of selected value in a field of same row ,so i set PPR ,initially i bounded these fields with spared attributes of VO but it was creating problem after page refresh ,i have raised the issue in the forum
Date value format is changed itself after page refresh
raised a tar with oracle ,issue was that these attributes are varchar type and used for the date fields, thats y creating the problem after page refresh ,VO extension didnt work bcz these attributes are already there in seeded VO with there data type, so they can not be changed in VO extension,oracle suggested create two columns with date type in the seeded table itself and use them in VO extension , i did it ,now the problem is
i have extended the VO ,and this problem came ,one thing i m not sure is
since i have added two new columns ,shud i do EO extension (i did it ) and then VO extension ,if yes then how bcz when i will move all the files from server they are all standard files and ,extended VO is getting the reference of seeded VO which is using the seeded EO not the extended EO .
so what approch or steps shuld i follow to add this newly added column in VO .
thanx
Pratap -
Hi all,
I have a problem with my BDC, I am using a CALL transaction to update few fields. When I do a Call transaction using 'A'(all screen mode) the values which I am passing are getting updated.But when I do the same thing using 'N'(No screen mode) the values are not getting updated.
Please help me with this.
Thanks
JMHi,
You would be some BDC_OKCODE(e.g for information POPUP) which is not captured in your BDC recording. This OKCODE maybe manually proccesed
by you using enter or click in the forreground mode. Also check for warning messages.
If there are none of those mentioned, you can use the following option of Call transaction
CALL TRANSACTION <tcode> USING <bdcdata_tab> OPTIONS FROM <opt>.
opt is a structure of type ctu_params and it needs to be populated(before calling the above statement) as below.
opt-dismode = 'N'.
Regards -
FB01 BDC Program Posting Error in a coding block
Hi,
I am trying to write a BDC for fb01 transaction with posting key 31 and 40.
But I am getting a coding block as a popup in FB01 trsanction on screen number 'SAPLKACB' '0002'.
I am passing costcentre and Internal Order and then passing an Enter f code for this...But still i am getting a message that Input data not passed to this screen..
If i run this in All screen mode by manually putting enter its working if i try to put an enter programatically its not working..
Your Answers will be Appreciated..
Please let me know if you come across this any time..
Thanks
SrinivasaHi,
I personally feel that instead of doing a BDC for accounting document post using FB01, please use the BAPI - bapi_acc_document_post
Regards,
Sridevi -
Sql parameter substitution problems
Hi,
I am having problems with the sql parameter substitution. I have a query that
looks like this:
select name,value from table where name in ('name1','name2');
I have tried building a string that equals "'name1','name2'" and passing it as
a parameter to sql entering the javaDoc comments like:
select name,value from table where name in ({nameString})
The problem is that when it is substituted and set to the database it looks like
this:
select name,value from table where name in ('\'name1\',\'name2\'');
This will not work. Does anyone have any suggestions on how to do this using a
database control. Basically I'm looking for the ability to create dynamic sql
statements.
Thanks for your help.
Regards,
JamesAnurag,
Thanks for the reply. I don't think that this solves my problem though. I will
never know how many strings to pass. It's all based on what the user wants, they
could ask for 2, 20, or any other number of names. It sounds like using a Database
control is not really possible for this situation. What do you think? Any chance
of this making into workshop in the future or in these situations is creating
an EJB the only way to go?
Thanks again.
Regards,
James Chamberlain
"Anurag Pareek" <[email protected]> wrote:
Hi James,
This result is same as what you will get on executing the following prepared
statement:
conn.prepareStatement("select empid from empdemo where name in (?)");
pstmt.setString(1,"'Person 1','Person 2','Person 3'");
pstmt3.execute();
Workshop's DBControl internally uses a PreparedStatement, hence you would
obtain the same result.
To get it working, you will need to pass in the 3 strings separately
as
below:
conn.prepareStatement("select empid from empdemo where name in
pstmt.setString(1,"Person 1");
pstmt.setString(1,"Person 2");
pstmt.setString(1,"Person 3");
Please do let me know if you have further queries regarding the issue.
Regards,
Anurag
Workshop Support
"James Chamberlain" <[email protected]> wrote in message
news:[email protected]...
Hi,
I am having problems with the sql parameter substitution. I have aquery
that
looks like this:
select name,value from table where name in ('name1','name2');
I have tried building a string that equals "'name1','name2'" and passingit as
a parameter to sql entering the javaDoc comments like:
select name,value from table where name in ({nameString})
The problem is that when it is substituted and set to the databaseit
looks like
this:
select name,value from table where name in ('\'name1\',\'name2\'');
This will not work. Does anyone have any suggestions on how to do thisusing a
database control. Basically I'm looking for the ability to create dynamicsql
statements.
Thanks for your help.
Regards,
James -
Substitution - Problems reported (repairable) - Message
I can substitution rule without any error message. But when I revisit the substitution area, I can see the message "Problems reported (repairable)" under 'rule activation' tab.
The message changes to 'Successful' when I click 'Retry'Hi all,
I got a similar error:
- Whenever I create a substitution rule, activate it and press then "Refresh", I get two substition rules (for two different users).
This is highly strange. Does anyone have any hints how to avoid to get these two rules?
Best Regards
Philipp Kölsch -
Message "data was copied" on FB01 via substitution
Dear gurus
On FB01, when I insert "invoice ref." manually
and change the "baseline date" manually,
the message showed that "data was copied".
This is what I want.
However, when I insert "invoice ref." via substitution(GGB1),
the message "data was copied" is NOT showed.
I guess the change of "baseline date" become the trigger event
for this data copy.
Do you have any idea to show the message "data was copied" even though
when I insert "invoice ref." via substitution(GGB1)?
Should I use Open-FI?
BR
Y.KanekoHi,
I am not clear about your requirement.
Can you make it more clear. What value you want in Invoice ref and which date required in base line date.
Regards,
Sankar -
URGENT: Substitution Problem when deployed in Server
Hello:
I am facing a strange problem in student system self-service application customization in oxford university.
I have create a new XxigsPersProgAttemptVO extending PersProgAttemptVO and done the substitution. When run the the page though JDev it was showing the substituted values.
I have deployed the JPX and VO xml, classes into the server.
and bounced the apache.
When i run the application it's throwing following error
oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition AttendanceTypeDesc of type Attribute not found
When i view the About this page Business components list, i couldn't find XxigsPersProgAttemptVO VO object.
But when i run the same page through JDEV, it's shows me my custom VO and substituded VO and extended EO.
which was right and page was working fine.
and when i run
jdr_utils.PRINTDOCUMENT('/oracle/apps/igs/person/components/server/customizations/site/0/PersProgAttemptVO',1000);
it's showed me
.........RESULT:
<?xml version='1.0' encoding='UTF-8'?>
<customization xmlns="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:user="http://xmlns.oracle.com/user" version="9.0.3.8.13_1550" xml:lang="en-US" customizes="/oracle/apps/igs/person/components/server/PersProgAttemptVO">
<replace with="/oracle/apps/xxigs/person/components/server/XxigsPersProgAttemptVO"/>
</customization>
which was also right
then why i am getting the error in server and why the substitution is not taking in server.
Can any one help me in this regard pls?
Many Thanks in advance
Thanks and Regards,
Guptajust want to add few things
I am substituting the VO which was used in subtab
I just found an article in Metalink for the similar issue and found as a bug in OAPageBean.java.
Metalink Doc ID: 418682.1
Symptoms
In Oracle Applications 11i, after extending any framework page by doing VO (View Object) substitution for any VO that is found in subtab in any region in the page either by adding a new attribute to the VO or changing any clause in the VO query such as adding condition for the WHERE clause.
Then deploying the extension to the server successfully, and after that going to the extended page to check the substitution by pressing on (About this page) , and the result will be that you will be not able to see the new substituted VOs.
Or in case of adding a new attribute to the VO, you will get a framework exception saying that the "new attribute" is not found.
Cause
This is caused by the following INTERNAL bug that is not published through Metalink to customers, and it is reported on R12 and backported to R11i :
Bug 4970554 - VO SUBSTITUTION NOT WORKING
Which say that: any substituted View Object used inside a SubTab Layout is not working because of a defect in the code of file (OAPageBean.java) for any version prior to (115.545.115104.3) in Oracle Applications 11i
Please let me know if you have any ideas
Thanks and Regards,
Gupta -
hi all,
I'm facing problem while entering multiple lineitem for fb01 transaction. i can finish my debt either with two lineitem or with 100 lineitem also. but i'm getting screen error from 2nd lieitem onwards while uploading data from my excel.
Please help in this regard. its very urgent for me.
With thanks,
subbu.Hi,
we should give in flat file one common field like s.no in both header and line items.
Maybe you are looking for
-
Windows 7 Crashes/Freezes when playing ANY Video files
lets see can anyone get their head around this one as it is driving me round the bend. So... I have a media centre PC connected to my HDTV by VGA cable. I ran the PC on XP for a long time but last December, I upgraded it to Windows 7 along with my l
-
Correctly setting up a C++ development environment with clang++
I'm going to reinstall Arch x64 soon, as the current installation was not done properly, and I have some doubts on how I should set up my development environment correctly. My compiler of choice is clang++ 3.4 SVN and my IDE of choice is QTCreator gi
-
Wrong orientation of text selection cursor
I've OCR'ed a PDF document with page orienation "portrait" using Acrobat Pro XI with setting "exact image". Unfortunately the text selection cursor has the wrong orientation, its orientation is "horizontal" but should be "vertical" as the text is wri
-
Hi I have written a code for reading the xml data using SAXParser.... my code is like this : package example.sax; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sax.XMLReader; import org.xml.sax.helpers.Defau
-
Hi,I had a problem with updating my Lenovo Tab2 A7-30 HC tablet. It was error and the tablet stoped on recovery menu.I found stock ROM in the internet, but it was fro A3300GV. So, when I flashed, the tablet had bricked.I can't do anything. The comut