Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

populate workarea

Former Member
0 Likes
442

Dear Friends,

lw_wah_iorec is a workarea from type CCIHS_WAHIOT.

All what I need is to populate its field WAID with

users input from select-options.

Before calling 'ZCBIH_WA10_WKA_SUCCESSORS_GET'

is lw_wah_iorec-waid empty. I can see that in debug mode.

Whats wrong here?

Regards

sas

IF NOT so_waid-low IS INITIAL.
    ccihs_rephslsel-waid =  so_waid-low.
    wa_wah_iorec-waid    =  so_waid-low.
  ENDIF.



  CALL FUNCTION 'ZCBIH_WA10_WKA_SUCCESSORS_GET'
    EXPORTING
      i_wah_iorec = lw_wah_iorec
      i_addinf    = i_addinf
    TABLES
      e_wah_iotab = lt_ccihs_wahiot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
417

Hello,

Try this:


IF NOT so_waid-low IS INITIAL.
    ccihs_rephslsel-waid =  so_waid-low.
*****
    lw_wah_iorec-waid    =  so_waid-low.
*****
  ENDIF.
 
 
 
  CALL FUNCTION 'ZCBIH_WA10_WKA_SUCCESSORS_GET'
    EXPORTING
      i_wah_iorec = lw_wah_iorec
      i_addinf    = i_addinf
    TABLES
      e_wah_iotab = lt_ccihs_wahiot.

And remember that the select-options is an internal table . You need to do a loop into an work area and then move it to the required field and call the FM inside the loop.

Regards,

2 REPLIES 2
Read only

valter_oliveira
Active Contributor
0 Likes
417

Hello.

Why are you using:


wa_wah_iorec-waid    =  so_waid-low

and then using:


i_wah_iorec = lw_wah_iorec

It's not the same structure.

BEst regards.

Valter Oliveira.

Read only

Former Member
0 Likes
418

Hello,

Try this:


IF NOT so_waid-low IS INITIAL.
    ccihs_rephslsel-waid =  so_waid-low.
*****
    lw_wah_iorec-waid    =  so_waid-low.
*****
  ENDIF.
 
 
 
  CALL FUNCTION 'ZCBIH_WA10_WKA_SUCCESSORS_GET'
    EXPORTING
      i_wah_iorec = lw_wah_iorec
      i_addinf    = i_addinf
    TABLES
      e_wah_iotab = lt_ccihs_wahiot.

And remember that the select-options is an internal table . You need to do a loop into an work area and then move it to the required field and call the FM inside the loop.

Regards,