01-07-2015 7:18 AM
i have a module pool with selection screen(it looks like a report and gets executed on f8, or execute button).
My requirement is calling this module pool from another program and skip its selection screen.
I see BDc is the only way to do this , please tell me if there exists any other way also.
i have created a recording (SHDB) for module pool screen.
While recording,when i enter some values in some fields, i need to press enter(some other fields gets filled as per values i have filled before enter).
Suppose after pressing enter 3 new fields gets populated, but i want to clear 1 of them(cleared while recording).
Now i have created a program from the recording.
What is happening:
I am passing few idoc no in multiple selections(select-options).
1.It is saying conversion error.(don't know why).
2.i need to clear update date(which gets filled automatically when i press enter) in BDC program, but it is not clearing and executing the program without clearing update values.Which results in records are not fetched.
Field name:S_UPDATE-LOW,S_UPDATE-HIGH.
Note:
I have not used Standard include BDCREXC1.instead i have created my own performs for appending data in table BDCDATA.
Please guide me , where to add code for clearing these dates in update date field.I have already added that code, but may be it is in improper place that why it is not clearing those values before execute.
Code Snippet from BDC Recording.
* PERFORM open_group.
PERFORM bdc_dynpro USING 'Z000_DATA' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'P_INFID'.
PERFORM bdc_field USING 'P_INFID'
'ZSHPCON_IN'.
PERFORM bdc_field USING 'P_RBIDOC'
'X'.
PERFORM bdc_field USING 'S_UPDDAT-LOW'
''.
PERFORM bdc_field USING 'S_UPDDAT-HIGH'
''.
PERFORM bdc_dynpro USING 'Z000_DATA' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00510100004067126'.
PERFORM bdc_field USING 'P_INFID'
'ZSHPCON_IN'.
PERFORM bdc_field USING 'P_MSGCHG'
'E'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S_UPDDAT-LOW'.
PERFORM bdc_field USING 'S_UPDDAT-LOW'
''.
PERFORM bdc_field USING 'S_UPDDAT-HIGH'
'01/06/2015'.
PERFORM bdc_field USING 'P_RBIDOC'
'X'.
PERFORM bdc_dynpro USING 'SAPLALDB' '3000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CLIP'.
LOOP AT intedidc .
*-------------------------------------------------------------------
v_index = v_index + 1. CONDENSE v_index.
CONCATENATE 'RSCSEL_255-SLOW_I(' '0' v_index ')' INTO v_string.
IF v_index = 1.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
ENDIF.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING v_string
intedidc-docnum.
IF v_index = 8.
v_index = 1.
IF v_index = 1.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
ENDIF.
ENDIF.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPLALDB' '3000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ACPT'.
PERFORM bdc_dynpro USING 'Z000_DATA' '1100'.
PERFORM bdc_field USING 'S_UPDDAT-LOW'
''."added
PERFORM bdc_field USING 'S_UPDDAT-HIGH'
'08/08/2018'."added
PERFORM bdc_dynpro USING 'Z000_DATA' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=EXEC'.
PERFORM bdc_field USING 'P_INFID'
'ZSHPCON_IN'.
PERFORM bdc_field USING 'S_UPDDAT-LOW'
''."added
PERFORM bdc_field USING 'S_UPDDAT-HIGH'
''."added
PERFORM bdc_field USING 'P_MSGCHG'
'E'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S_UPDDAT-LOW'.
PERFORM bdc_field USING 'S_UPDDAT-LOW'
''.
PERFORM bdc_field USING 'S_UPDDAT-HIGH'
'01/06/2015'.
*perform bdc_field using 'S_DOCNUM-LOW'
* ' 94747'.
PERFORM bdc_field USING 'P_RBIDOC'
'X'.
call TRANSACTION 'Z000' USING bdcdata[] mode 'A'.
*perform close_group.
01-07-2015 7:56 AM
Also try with ' ' (with space), SPACE, or cl_abap_char_utilities=>horizontal_tab
What is in PERFORM bdc_field?