on 05-17-2006 9:41 AM
Hi experts,
What is ment by preparing BUffers.
I have a scnario in CRM like this:
DATA: GV_SOLDTO_GUID_LAST TYPE BAPIBUS1006_HEAD-PARTNERGUID.
P_BP_SOLDTO_GUID TYPE BAPIBUS1006_HEAD-PARTNERGUID
check at first if the buffers are prepared this is the case
if the gv_soldto_guid_last is not initial and equal the soldto
IF GV_SOLDTO_GUID_LAST IS INITIAL OR
P_BP_SOLDTO_GUID NE GV_SOLDTO_GUID_LAST.
CLEAR LS_RETURN.
MESSAGE E124(CRM_ISALES_BP) INTO LS_RETURN-MESSAGE.
LS_RETURN-ID = SY-MSGID.
LS_RETURN-NUMBER = SY-MSGNO.
LS_RETURN-TYPE = SY-MSGTY.
APPEND LS_RETURN TO MESSAGES.
RETURNCODE = GC_ERR_ABORT_EXECUTION.
EXIT.
ENDIF.
When i debug this the GV_SOLDTO_GUID_LAST is always initial Were as P_BP_SOLDTO_GUID has a value.
So it is printing error message E124.
Can any body suggest me here what is check at first if the buffers are prepared
Thanks in Advance.
Hi Jak,
Buffering : Buffering refers to executing a number of tasks and then finally do a single commit for the whole set of tasks.
Say, for e.g. we create business partner using BAPI_BUPA_CREATE_FROM_DATA we don't commit here, we get a partner number from this BAPI and then we assign a role to it using BAPI_BUPA_ROLE_ADD we still don't commit, we then add the address for the partner using BAPI_BUPA_ADDRESS_ADD then we call BAPI_TRANSACTION_COMMIT for the whole set of tasks.
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Buffering can also be referred as the global area to store data. Technically, this is achieved through global variables. In CRM, you will find global variables used in all the cases. In your example, populate
GV_SOLDTO_GUID_LAST with the value of P_BP_SOLDTO_GUID. You can do this if the variable GV_SOLDTO_GUID_LAST is available during your code execution.
Thanks
Kamal
Hi,
Thanks for your efforts.
this is the code of one standard FM CRM_ISA_SHIPTO_ADD_TO_BASKET in CRM.
i have to analize this FM.
1.See there is a variable GV_SOLDTO_GUID_LAST which is declared using data statement.It is refering a Structure field.
2.There is one more variable P_BP_SOLDTO_GUID .This has a value. ie..this value i give when i exicute FM.
So obesreve this code.
check at first if the buffers are prepared this is the case
if the gv_soldto_guid_last is not initial and equal the soldto
IF GV_SOLDTO_GUID_LAST IS INITIAL OR
P_BP_SOLDTO_GUID NE GV_SOLDTO_GUID_LAST.
CLEAR LS_RETURN.
MESSAGE E124(CRM_ISALES_BP) INTO LS_RETURN-MESSAGE.
LS_RETURN-ID = SY-MSGID.
LS_RETURN-NUMBER = SY-MSGNO.
LS_RETURN-TYPE = SY-MSGTY.
APPEND LS_RETURN TO MESSAGES.
RETURNCODE = GC_ERR_ABORT_EXECUTION.
EXIT.
ENDIF.
When i debug the above code the value of GV_SOLDTO_GUID_LAST is always initial.
and P_BP_SOLDTO_GUID has value.So the above if condition is true and it enters the IF condition and prints the error message E124 and it won't proceed furthur and goes to the end of function.
Observe the comments.
I don't know why the have written this piece of code.
I think you got now what i am asking..
If you undersatnd pls give some suggessions.
Thanks in Advance.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.