on 03-13-2013 11:59 PM
Olá, alguém aqui ja se aventurou em preencher o bloco P???
Se sim, sabem alguma dica de como preencher a estrutura..CS_BLOCK_P type J_1BPIS_S_BLOCK_P.
Aguardo. Obrigado.
heim...segue solução:
método: IF_EX_BADI_J_1BPIS~FILL_BLOCK_P_FI, preenchimento bloco p
clear: wa_s_p100_hierarchy,wa_s_p010_hierarchy.
refresh: it_p100_hierarchy, it_p010_hierarchy.
* Preenchimento ultimo nivel hierarquico
move s_p100 to wa_s_p100_hierarchy-s_p100.
append wa_s_p100_hierarchy to it_p100_hierarchy.
* Check troca CNPJ, não permite lançamentos com CNPJ iguais
if cs_block_p is not initial.
clear: wa_s_p010_hierarchy-s_p010,s_p010_aux.
loop at cs_block_p-t_p010 into wa_s_p010_hierarchy .
move-corresponding wa_s_p010_hierarchy to wa_s_p010_hierarchy-s_p010.
move-corresponding wa_s_p010_hierarchy-s_p010 to s_p010_aux.
if s_p010_aux-cnpj = s_p010-cnpj.
clear: s_p010.
endif.
endloop.
clear: wa_s_p010_hierarchy-s_p010.
refresh: wa_s_p010_hierarchy-t_p100 .
endif.
* preenchimento 2 nivel hierarquico
move s_p010 to wa_s_p010_hierarchy-s_p010.
append wa_s_p100_hierarchy to wa_s_p010_hierarchy-t_p100.
* preenchimento 3 nivel hierarquico
move s_p001 to cs_block_p-s_p001.
append wa_s_p010_hierarchy to cs_block_p-t_p010.
método: IF_EX_BADI_J_1BPIS~FILL_BLOCK_P.....antes da impressão
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
2 | |
2 | |
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.